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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Nov 4 23:28:12 2006 UTC (13 years, 8 months ago) by betelgeuse
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Removed old versions.
(Portage version: 2.1.2_rc1-r3)
 (Signed Manifest commit)

1 # Copyright 1999-2006 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.15.ebuild,v 1.2 2006/06/13 11:01:55 uberlord Exp $
4
5 inherit eutils 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="~x86 ~amd64"
13
14 IUSE="debug usb"
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_PARAMS="KSRC=${ROOT}${KV_DIR} KVERS=${KV_FULL}"
23 BUILD_TARGETS="all"
24 MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")
25
26 ERROR_USB="You need to enable USB support in your kernel
27 to use usb support in ndiswrapper."
28
29 pkg_setup() {
30 einfo "See http://www.gentoo.org/doc/en/gentoo-kernel.xml for a list of supported kernels."
31 echo ""
32 use usb && CONFIG_CHECK="${CONFIG_CHECK} USB"
33 linux-mod_pkg_setup
34 }
35
36 src_unpack() {
37 unpack ${A}
38 cd ${S}
39 epatch ${FILESDIR}/${PN}-1.2-suspend2.patch || die "suspend2 patch failed"
40
41 convert_to_m ${S}/driver/Makefile
42 }
43
44 src_compile() {
45 local params
46
47 # Enable verbose debugging information
48 if use debug; then
49 params="DEBUG=3"
50 use usb && params="${params} USB_DEBUG=1"
51 fi
52
53 cd utils
54 emake || die "Compile of utils failed!"
55
56 use usb || params="DISABLE_USB=1"
57
58 BUILD_PARAMS="${BUILD_PARAMS} ${params}" linux-mod_src_compile
59 }
60
61 src_install() {
62 dodoc README INSTALL AUTHORS ChangeLog
63 doman ndiswrapper.8
64
65 keepdir /etc/ndiswrapper
66
67 linux-mod_src_install
68
69 cd utils
70 make DESTDIR="${D}" install
71 }
72
73 pkg_postinst() {
74 linux-mod_pkg_postinst
75 echo
76 einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
77 einfo "to function. Download these to /root for example, then"
78 einfo "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
79 einfo "They will be copied to the proper location."
80 einfo "Once done, please run 'modules-update'."
81 echo
82 einfo "check http://ndiswrapper.sf.net/mediawiki/index.php/List for drivers"
83 I=$(lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4)
84 einfo "Look for the following on that page for your driver:"
85 einfo "Possible Hardware: ${I}"
86 echo
87 einfo "Please have a look at http://ndiswrapper.sourceforge.net/wiki/"
88 einfo "for the FAQ, HowTos, Tips, Configuration, and installation"
89 einfo "information."
90 echo
91 ewarn "Attempting to automatically reinstall any Windows drivers"
92 ewarn "you might already have."
93 for driver in $(ls /etc/ndiswrapper)
94 do
95 einfo "Driver: ${driver}"
96 mv /etc/ndiswrapper/${driver} /tmp
97 ndiswrapper -i /tmp/${driver}/${driver}.inf
98 done
99 }

  ViewVC Help
Powered by ViewVC 1.1.20