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

Contents of /net-wireless/ndiswrapper/ndiswrapper-0.10.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.10.ebuild,v 1.3 2004/10/09 07:30:13 cardoe Exp $
4
5 inherit kernel-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}/${PN}-${PV}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="x86"
14 IUSE=""
15 DEPEND="sys-apps/pciutils"
16 S=${WORKDIR}/${PN}-${PV}
17
18 src_unpack() {
19 check_KV
20 kernel-mod_getversion
21 unpack ${A}
22
23 # Fix path to kernel and KVERS
24 sed -i -e "s:^KSRC.*:KSRC=${ROOT}/usr/src/linux:" \
25 -e "s:^KVERS.*:KVERS=${KV_MAJOR}${KV_MINOR}:" \
26 ${S}/driver/Makefile
27
28 if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ]
29 then
30 sed -i 's:SUBDIRS=:M=:g' ${S}/driver/Makefile
31 fi
32 }
33
34 src_compile() {
35 # Unset ARCH for 2.5/2.6 kernel compiles
36 if [ ${KV_MINOR} -gt 4 ] ; then
37 unset ARCH
38 fi
39
40 emake || die "Compile Failed!"
41 }
42
43 src_install() {
44 if [ ${KV_MINOR} -gt 4 ]
45 then
46 MOD_SUFFIX="ko"
47 else
48 MOD_SUFFIX="o"
49 fi
50
51 dosbin ${S}/utils/ndiswrapper
52 dosbin ${S}/utils/ndiswrapper-buginfo
53
54 dodoc ${S}/README ${S}/INSTALL ${S}/AUTHORS ${S}/ChangeLog
55
56 insinto /lib/modules/${KV}/misc
57 doins ${S}/driver/ndiswrapper.${MOD_SUFFIX}
58
59 into /
60 dosbin ${S}/utils/loadndisdriver
61
62 insinto /etc/modules.d
63 newins ${FILESDIR}/${PN}-0.9-modules.d ndiswrapper
64
65 dodir /etc/ndiswrapper
66 }
67
68 pkg_postinst() {
69 einfo "Checking kernel module dependencies"
70 test -r "${ROOT}/usr/src/linux/System.map" && \
71 depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV}
72
73
74 einfo
75 einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
76 einfo "to function. Download these to /root for example, then"
77 einfo "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
78 einfo "They will be copied to the proper location."
79 einfo "Once done, please run 'update-modules'."
80 einfo
81 einfo "As of release 0.9, you no longer have to call 'loadndiswrapper'"
82 einfo "explicitly. The module will handle it automatically."
83 einfo
84 einfo "check http://ndiswrapper.sf.net/supported_chipsets.html for drivers"
85 I=`lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4`
86 einfo "Look for the following on that page for your driver:"
87 einfo ${I}
88 einfo
89 einfo "Please have a look at http://ndiswrapper.sourceforge.net/wiki/"
90 einfo "for the FAQ, HowTos, Tips, Configuration, and installation"
91 einfo "information."
92 einfo
93 }
94
95 pkg_config() {
96 ewarn "New versions of ndiswrapper do not require you to run config"
97
98 if [ ! -f "/etc/modules.d/ndiswrapper" ] ; then
99 eerror "/etc/modules.d/ndiswrapper not found. Please re-emerge"
100 eerror "${PN} to have this file installed, then re-run this script."
101 die "Driver configuration file not found!"
102 fi
103 }
104

  ViewVC Help
Powered by ViewVC 1.1.20