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

Contents of /net-wireless/ndiswrapper/ndiswrapper-1.55.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Aug 1 12:46:51 2009 UTC (11 years ago) by ssuominen
Branch: MAIN
Version bump wrt #274393, thanks to Fabio Correa.
(Portage version: 2.2_rc33/cvs/Linux x86_64)

1 # Copyright 1999-2009 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-r1.ebuild,v 1.2 2008/11/20 15:40:08 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
47 src_compile() {
48 local params
49
50 # Enable verbose debugging information
51 if use debug; then
52 params="DEBUG=3"
53 use usb && params="${params} USB_DEBUG=1"
54 fi
55
56 cd utils
57 emake || die "Compile of utils failed!"
58
59 use usb || params="DISABLE_USB=1"
60
61 # Does not like parallel builds
62 # http://bugs.gentoo.org/show_bug.cgi?id=154213
63 # KBUILD value can't be quoted
64 # http://bugs.gentoo.org/show_bug.cgi?id=156319
65 BUILD_PARAMS="KSRC=${KV_DIR} KVERS=${KV_FULL} KBUILD=${KV_OUT_DIR} ${params} -j1"
66 linux-mod_src_compile
67 }
68
69 src_install() {
70 dodoc AUTHORS ChangeLog INSTALL README
71 doman ndiswrapper.8 || die
72
73 keepdir /etc/ndiswrapper
74
75 linux-mod_src_install
76
77 cd utils
78 emake DESTDIR="${D}" install || die "emake install failed"
79 }
80
81 pkg_postinst() {
82 linux-mod_pkg_postinst
83
84 echo
85 elog "NDISwrapper requires .inf and .sys files from a Windows(tm) driver"
86 elog "to function. Download these to /root for example, then"
87 elog "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
88 elog "They will be copied to /etc/ndiswrapper/."
89 elog "Once done, please run 'update-modules'."
90 elog
91
92 elog "Please look at ${HOMEPAGE}"
93 elog "for the FAQ, HowTos, tips, configuration, and installation"
94 elog "information."
95 elog
96
97 local i=$(lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4)
98 if [[ -n "${i}" ]] ; then
99 elog "Possible hardware: ${i}"
100 elog
101 fi
102
103 elog "NDISwrapper devs need support (_hardware_, cash)."
104 elog "Don't hesitate if you can help."
105 elog "See ${HOMEPAGE} for details."
106 echo
107
108 if [[ ${ROOT} == "/" ]]; then
109
110 einfo "Attempting to automatically reinstall any Windows drivers"
111 einfo "you might already have."
112 echo
113
114 local driver
115 for driver in $(ls /etc/ndiswrapper) ; do
116 einfo "Driver: ${driver}"
117 mv "/etc/ndiswrapper/${driver}" "${T}"
118 ndiswrapper -i "${T}/${driver}/${driver}.inf"
119 done
120 fi
121 }

  ViewVC Help
Powered by ViewVC 1.1.20