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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Apr 16 17:44:45 2007 UTC (13 years, 3 months ago) by peper
Branch: MAIN
Version bump, s/modules-update/update-modules/ and s/einfo/elog/ where appropriate. bug #174769.
(Portage version: 2.1.2.3)

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

  ViewVC Help
Powered by ViewVC 1.1.20