/[gentoo-x86]/net-wireless/ndiswrapper/ndiswrapper-1.53-r1.ebuild
Gentoo

Contents of /net-wireless/ndiswrapper/ndiswrapper-1.53-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Oct 27 12:52:56 2008 UTC (11 years, 9 months ago) by peper
Branch: MAIN
Add 1.53-r1 straight to x86. Security bug #239371.
(Portage version: 2.2_rc12/cvs/Linux 2.6.26-gentoo x86_64, RepoMan options: --force)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-1.53.ebuild,v 1.1 2008/05/30 10:33:36 peper Exp $
4
5 inherit linux-mod
6
7 MY_P=${PN}-${PV/_/}
8
9 DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
10 HOMEPAGE="http://ndiswrapper.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
12
13 LICENSE="GPL-2"
14 KEYWORDS="~amd64 x86"
15 IUSE="debug usb"
16
17 DEPEND="sys-apps/pciutils"
18 RDEPEND="${DEPEND}
19 net-wireless/wireless-tools"
20
21 CONFIG_CHECK="WIRELESS_EXT"
22
23 S=${WORKDIR}/${MY_P}
24
25 MODULE_NAMES="ndiswrapper(misc:${S}/driver)"
26 BUILD_TARGETS="all"
27 MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")
28
29 ERROR_USB="You need to enable USB support in your kernel
30 to use usb support in ndiswrapper."
31
32 pkg_setup() {
33 echo
34 einfo "See http://www.gentoo.org/doc/en/gentoo-kernel.xml"
35 einfo "for a list of supported kernels."
36 echo
37
38 use usb && CONFIG_CHECK="${CONFIG_CHECK} USB"
39 linux-mod_pkg_setup
40 }
41
42 src_unpack() {
43 unpack ${A}
44 convert_to_m "${S}/driver/Makefile"
45
46 cd "${S}/driver"
47 epatch "${FILESDIR}/ndiswrapper-CVE-2008-4395.patch"
48 }
49
50 src_compile() {
51 local params
52
53 # Enable verbose debugging information
54 if use debug; then
55 params="DEBUG=3"
56 use usb && params="${params} USB_DEBUG=1"
57 fi
58
59 cd utils
60 emake || die "Compile of utils failed!"
61
62 use usb || params="DISABLE_USB=1"
63
64 # Does not like parallel builds
65 # http://bugs.gentoo.org/show_bug.cgi?id=154213
66 # KBUILD value can't be quoted
67 # http://bugs.gentoo.org/show_bug.cgi?id=156319
68 BUILD_PARAMS="KSRC=${KV_DIR} KVERS=${KV_FULL} KBUILD=${KV_OUT_DIR} ${params} -j1"
69 linux-mod_src_compile
70 }
71
72 src_install() {
73 dodoc AUTHORS ChangeLog INSTALL README
74 doman ndiswrapper.8 || die
75
76 keepdir /etc/ndiswrapper
77
78 linux-mod_src_install
79
80 cd utils
81 emake DESTDIR="${D}" install || die "emake install failed"
82 }
83
84 pkg_postinst() {
85 linux-mod_pkg_postinst
86
87 echo
88 elog "NDISwrapper requires .inf and .sys files from a Windows(tm) driver"
89 elog "to function. Download these to /root for example, then"
90 elog "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
91 elog "They will be copied to /etc/ndiswrapper/."
92 elog "Once done, please run 'update-modules'."
93 elog
94
95 elog "Please look at ${HOMEPAGE}"
96 elog "for the FAQ, HowTos, tips, configuration, and installation"
97 elog "information."
98 elog
99
100 local i=$(lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4)
101 if [[ -n "${i}" ]] ; then
102 elog "Possible hardware: ${i}"
103 elog
104 fi
105
106 elog "NDISwrapper devs need support (_hardware_, cash)."
107 elog "Don't hesitate if you can help."
108 elog "See ${HOMEPAGE} for details."
109 echo
110
111 if [[ ${ROOT} == "/" ]]; then
112
113 einfo "Attempting to automatically reinstall any Windows drivers"
114 einfo "you might already have."
115 echo
116
117 local driver
118 for driver in $(ls /etc/ndiswrapper) ; do
119 einfo "Driver: ${driver}"
120 mv "/etc/ndiswrapper/${driver}" "${T}"
121 ndiswrapper -i "${T}/${driver}/${driver}.inf"
122 done
123 fi
124 }

  ViewVC Help
Powered by ViewVC 1.1.20