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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Dec 23 13:45:34 2006 UTC (13 years, 7 months ago) by peper
Branch: MAIN
Version bump.
(Portage version: 2.1.2_rc3-r7)

1 peper 1.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.31.ebuild,v 1.1 2006/12/20 22:08:43 peper 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"
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     # Does not like parallel builds
59     # http://bugs.gentoo.org/show_bug.cgi?id=154213
60    
61     # KBUILD trick needed to build against sources where only make
62     # modules_prepare has been run so /lib/modules/$(uname -r) does
63     # not exists yet
64     # KBUILD value can't be quoted or amd64 fails
65     # http://bugs.gentoo.org/show_bug.cgi?id=156319
66     BUILD_PARAMS="KBUILD=${KV_OUT_DIR} ${BUILD_PARAMS} ${params} -j1" linux-mod_src_compile
67     }
68    
69     src_install() {
70     dodoc README INSTALL AUTHORS ChangeLog
71     doman ndiswrapper.8
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     echo
84     einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
85     einfo "to function. Download these to /root for example, then"
86     einfo "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
87     einfo "They will be copied to the proper location."
88     einfo "Once done, please run 'modules-update'."
89     echo
90     einfo "check http://ndiswrapper.sf.net/mediawiki/index.php/List for drivers"
91     I=$(lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4)
92     einfo "Look for the following on that page for your driver:"
93     einfo "Possible Hardware: ${I}"
94     echo
95     einfo "Please have a look at http://ndiswrapper.sourceforge.net/wiki/"
96     einfo "for the FAQ, HowTos, Tips, Configuration, and installation"
97     einfo "information."
98     echo
99     # ewarn "Windows driver configuration file format has changed since 1.5."
100     # ewarn "You must re-install Windows drivers if they were installed before."
101    
102     einfo "Attempting to automatically reinstall any Windows drivers"
103     einfo "you might already have."
104     for driver in $(ls /etc/ndiswrapper)
105     do
106     einfo "Driver: ${driver}"
107     mv /etc/ndiswrapper/${driver} ${T}
108     ndiswrapper -i ${T}/${driver}/${driver}.inf
109     done
110     }

  ViewVC Help
Powered by ViewVC 1.1.20