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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri Feb 23 15:57:47 2007 UTC (13 years, 5 months ago) by peper
Branch: MAIN
Changes since 1.1: +4 -8 lines
QA wrt bug #168051.
(Portage version: 2.1.2-r10)

1 peper 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 peper 1.2 # $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-1.35.ebuild,v 1.1 2007/01/28 17:45:20 peper Exp $
4 peper 1.1
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="~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     cd "${S}"
38     # New patch for suspend2 kernels - peper
39     epatch "${FILESDIR}/${PN}-new_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 peper 1.2 # KBUILD value can't be quoted
61 peper 1.1 # http://bugs.gentoo.org/show_bug.cgi?id=156319
62 peper 1.2 BUILD_PARAMS="KSRC=${KV_DIR} KVERS=${KV_FULL} KBUILD=${KV_OUT_DIR} ${params} -j1"
63     linux-mod_src_compile
64 peper 1.1 }
65    
66     src_install() {
67     dodoc README INSTALL AUTHORS ChangeLog
68     doman ndiswrapper.8
69    
70     keepdir /etc/ndiswrapper
71    
72     linux-mod_src_install
73    
74     cd utils
75     emake DESTDIR="${D}" install || die "emake install failed"
76     }
77    
78     pkg_postinst() {
79     linux-mod_pkg_postinst
80     echo
81     einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
82     einfo "to function. Download these to /root for example, then"
83     einfo "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
84     einfo "They will be copied to the proper location."
85     einfo "Once done, please run 'modules-update'."
86     echo
87     einfo "check http://ndiswrapper.sf.net/mediawiki/index.php/List for drivers"
88     I=$(lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4)
89     einfo "Look for the following on that page for your driver:"
90     einfo "Possible Hardware: ${I}"
91     echo
92     einfo "Please have a look at http://ndiswrapper.sourceforge.net/wiki/"
93     einfo "for the FAQ, HowTos, Tips, Configuration, and installation"
94     einfo "information."
95     echo
96     einfo "ndiswrapper devs need support(_hardware_, cash)."
97     einfo "Don't hesistate if you can help, see http://ndiswrapper.sf.net for details."
98     echo
99    
100     einfo "Attempting to automatically reinstall any Windows drivers"
101     einfo "you might already have."
102     for driver in $(ls /etc/ndiswrapper)
103     do
104     einfo "Driver: ${driver}"
105     mv /etc/ndiswrapper/${driver} ${T}
106     ndiswrapper -i ${T}/${driver}/${driver}.inf
107     done
108     }

  ViewVC Help
Powered by ViewVC 1.1.20