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

Contents of /net-wireless/ndiswrapper/ndiswrapper-0.12-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Jan 15 21:11:28 2005 UTC (15 years, 5 months ago) by cardoe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
  revision bump to 1.0rc2, switched to linux-mod
(Portage version: 2.0.51-r13)

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-0.12-r1.ebuild,v 1.3 2004/12/26 00:21:32 cardoe Exp $
4
5 inherit linux-info
6
7 DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
8 HOMEPAGE="http://ndiswrapper.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${PN}-${PV}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="x86"
14
15 IUSE="debug"
16 DEPEND="sys-apps/pciutils"
17 S=${WORKDIR}/${PN}-${PV}
18
19 src_unpack() {
20 unpack ${A}
21
22 SWS=`grep '# CONFIG_SOFTWARE_SUSPEND2 is not set' ${ROOT}/usr/src/linux/.config`
23
24 if [ -n "${SWS}" ]
25 then
26 eerror "You have a kernel patched with Software Suspend 2 (swsusp2)"
27 eerror "but don't have it enabled. You must remove the patch or"
28 eerror "enable Software Suspend 2 (swsusp2)."
29 eerror "http://bugs.gentoo.org/show_bug.cgi?id=74864"
30 die "Fix your kernel"
31 fi
32
33 # Fix path to kernel and KVERS
34 sed -i -e "s:^KSRC.*:KSRC=${ROOT}/usr/src/linux:" \
35 -e "s:^KVERS.*:KVERS=${KV_MAJOR}${KV_MINOR}:" \
36 ${S}/driver/Makefile
37
38 if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ]
39 then
40 sed -i 's:SUBDIRS=:M=:g' ${S}/driver/Makefile
41 fi
42 }
43
44 src_compile() {
45 # Unset ARCH for 2.5/2.6 kernel compiles
46 if [ ${KV_MINOR} -gt 4 ] ; then
47 unset ARCH
48 fi
49
50 # Enable verbose debugging information
51 use debug && export DEBUG=3
52
53 emake || die "Compile Failed!"
54 }
55
56 src_install() {
57 if [ ${KV_MINOR} -gt 4 ]
58 then
59 MOD_SUFFIX="ko"
60 else
61 MOD_SUFFIX="o"
62 fi
63
64 dosbin ${S}/utils/ndiswrapper
65 dosbin ${S}/utils/ndiswrapper-buginfo
66
67 dodoc ${S}/README ${S}/INSTALL ${S}/AUTHORS ${S}/ChangeLog
68 doman ${S}/ndiswrapper.8
69
70 insinto /lib/modules/${KV}/misc
71 doins ${S}/driver/ndiswrapper.${MOD_SUFFIX}
72
73 into /
74 dosbin ${S}/utils/loadndisdriver
75
76 insinto /etc/modules.d
77 newins ${FILESDIR}/${PN}-0.9-modules.d ndiswrapper
78
79 dodir /etc/ndiswrapper
80 }
81
82 pkg_postinst() {
83 echo
84 einfo "Checking kernel module dependencies"
85 test -r "${ROOT}/usr/src/linux/System.map" && \
86 depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV}
87 echo
88 einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
89 einfo "to function. Download these to /root for example, then"
90 einfo "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
91 einfo "They will be copied to the proper location."
92 einfo "Once done, please run 'update-modules'."
93 einfo
94 einfo "As of release 0.9, you no longer have to call 'loadndiswrapper'"
95 einfo "explicitly. The module will handle it automatically."
96 einfo
97 einfo "check http://ndiswrapper.sf.net/supported_chipsets.html for drivers"
98 I=`lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4`
99 einfo "Look for the following on that page for your driver:"
100 einfo ${I}
101 einfo
102 einfo "Please have a look at http://ndiswrapper.sourceforge.net/wiki/"
103 einfo "for the FAQ, HowTos, Tips, Configuration, and installation"
104 einfo "information."
105 echo
106 }
107
108 pkg_config() {
109 ewarn "New versions of ndiswrapper do not require you to run config"
110
111 if [ ! -f "/etc/modules.d/ndiswrapper" ] ; then
112 eerror "/etc/modules.d/ndiswrapper not found. Please re-emerge"
113 eerror "${PN} to have this file installed, then re-run this script."
114 die "Driver configuration file not found!"
115 fi
116 }
117

  ViewVC Help
Powered by ViewVC 1.1.20