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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sun Apr 2 14:58:33 2006 UTC (14 years, 3 months ago) by betelgeuse
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
Removed old versions.
(Portage version: 2.1_pre7-r3)

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.2.ebuild,v 1.8 2006/01/05 23:39:50 betelgeuse Exp $
4
5 inherit linux-mod eutils
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"
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_MAJOR}${KV_MINOR}"
23 BUILD_TARGETS="all"
24 MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")
25
26 pkg_setup() {
27 linux-mod_pkg_setup
28
29 if [[ ${KV_MINOR} -eq 6 && ${KV_PATCH} -gt 13 ]]; then
30 eerror ""
31 eerror "This version does not work with kernel later than 2.6.13."
32 eerror "See http://bugs.gentoo.org/show_bug.cgi?id=111029 for more"
33 eerror "information."
34 die "This version does not work with the selected kernel."
35 fi
36 }
37
38 src_unpack() {
39 unpack ${A}
40
41 cd ${S}
42 epatch ${FILESDIR}/${P}-suspend2.patch || die "suspend2 patch failed"
43
44 einfo "The only kernels that will work are gentoo-sources, vanilla-sources, and suspend2-sources."
45 einfo "No other kernels are supported. Kernels like the mm kernels will NOT work."
46
47 convert_to_m ${S}/driver/Makefile
48 }
49
50 src_compile() {
51 # Enable verbose debugging information
52 use debug && export DEBUG=3
53
54 cd utils
55 emake || die "Compile of utils failed!"
56
57 linux-mod_src_compile
58
59 }
60
61 src_install() {
62 dosbin utils/ndiswrapper
63 dosbin utils/ndiswrapper-buginfo
64
65 into /
66 dosbin utils/loadndisdriver
67
68 dodoc README INSTALL AUTHORS ChangeLog
69 doman ndiswrapper.8
70
71 keepdir /etc/ndiswrapper
72
73 linux-mod_src_install
74 }
75
76 pkg_postinst() {
77 linux-mod_pkg_postinst
78 echo
79 einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
80 einfo "to function. Download these to /root for example, then"
81 einfo "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
82 einfo "They will be copied to the proper location."
83 einfo "Once done, please run 'update-modules'."
84 echo
85 einfo "check http://ndiswrapper.sf.net/mediawiki/index.php/List for drivers"
86 I=$(lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4)
87 einfo "Look for the following on that page for your driver:"
88 einfo "Possible Hardware: ${I}"
89 echo
90 einfo "Please have a look at http://ndiswrapper.sourceforge.net/wiki/"
91 einfo "for the FAQ, HowTos, Tips, Configuration, and installation"
92 einfo "information."
93 echo
94 ewarn "Attempting to automatically reinstall any Windows drivers"
95 ewarn "you might already have."
96 for driver in $(ls /etc/ndiswrapper)
97 do
98 einfo "Driver: ${driver}"
99 mv /etc/ndiswrapper/${driver} /tmp
100 ndiswrapper -i /tmp/${driver}/${driver}.inf
101 done
102 }

  ViewVC Help
Powered by ViewVC 1.1.20