/[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.1 - (show annotations) (download)
Sun Jan 28 17:45:20 2007 UTC (13 years, 6 months ago) by peper
Branch: MAIN
Version bump(1.35). Also finally add a correct patch for suspend2(already in ndiswrapper svn).
(Portage version: 2.1.2-r4)

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.33.ebuild,v 1.3 2007/01/11 17:11:35 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="~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_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 # New patch for suspend2 kernels - peper
40 epatch "${FILESDIR}/${PN}-new_suspend2.patch"
41
42 convert_to_m "${S}/driver/Makefile"
43 }
44
45 src_compile() {
46 local params
47
48 # Enable verbose debugging information
49 if use debug; then
50 params="DEBUG=3"
51 use usb && params="${params} USB_DEBUG=1"
52 fi
53
54 cd utils
55 emake || die "Compile of utils failed!"
56
57 use usb || params="DISABLE_USB=1"
58
59 # Does not like parallel builds
60 # http://bugs.gentoo.org/show_bug.cgi?id=154213
61
62 # KBUILD trick needed to build against sources where only make
63 # modules_prepare has been run so /lib/modules/$(uname -r) does
64 # not exists yet
65 # KBUILD value can't be quoted or amd64 fails
66 # http://bugs.gentoo.org/show_bug.cgi?id=156319
67 BUILD_PARAMS="KBUILD=${KV_OUT_DIR} ${BUILD_PARAMS} ${params} -j1" linux-mod_src_compile
68 }
69
70 src_install() {
71 dodoc README INSTALL AUTHORS ChangeLog
72 doman ndiswrapper.8
73
74 keepdir /etc/ndiswrapper
75
76 linux-mod_src_install
77
78 cd utils
79 emake DESTDIR="${D}" install || die "emake install failed"
80 }
81
82 pkg_postinst() {
83 linux-mod_pkg_postinst
84 echo
85 einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
86 einfo "to function. Download these to /root for example, then"
87 einfo "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
88 einfo "They will be copied to the proper location."
89 einfo "Once done, please run 'modules-update'."
90 echo
91 einfo "check http://ndiswrapper.sf.net/mediawiki/index.php/List for drivers"
92 I=$(lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4)
93 einfo "Look for the following on that page for your driver:"
94 einfo "Possible Hardware: ${I}"
95 echo
96 einfo "Please have a look at http://ndiswrapper.sourceforge.net/wiki/"
97 einfo "for the FAQ, HowTos, Tips, Configuration, and installation"
98 einfo "information."
99 echo
100 einfo "ndiswrapper devs need support(_hardware_, cash)."
101 einfo "Don't hesistate if you can help, see http://ndiswrapper.sf.net for details."
102 echo
103
104 einfo "Attempting to automatically reinstall any Windows drivers"
105 einfo "you might already have."
106 for driver in $(ls /etc/ndiswrapper)
107 do
108 einfo "Driver: ${driver}"
109 mv /etc/ndiswrapper/${driver} ${T}
110 ndiswrapper -i ${T}/${driver}/${driver}.inf
111 done
112 }

  ViewVC Help
Powered by ViewVC 1.1.20