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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (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.1: +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.ebuild,v 1.1 2004/12/07 19:32:39 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
15 IUSE="debug"
16 DEPEND="sys-apps/pciutils"
17 S=${WORKDIR}/${PN}-${PV}
18
19 src_unpack() {
20 check_KV
21 kernel-mod_getversion
22 unpack ${A}
23
24 # Fix path to kernel and KVERS
25 sed -i -e "s:^KSRC.*:KSRC=${ROOT}/usr/src/linux:" \
26 -e "s:^KVERS.*:KVERS=${KV_MAJOR}${KV_MINOR}:" \
27 ${S}/driver/Makefile
28
29 if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ]
30 then
31 sed -i 's:SUBDIRS=:M=:g' ${S}/driver/Makefile
32 fi
33 }
34
35 src_compile() {
36 # Unset ARCH for 2.5/2.6 kernel compiles
37 if [ ${KV_MINOR} -gt 4 ] ; then
38 unset ARCH
39 fi
40
41 # Enable verbose debugging information
42 use debug && export DEBUG=3
43
44 emake || die "Compile Failed!"
45 }
46
47 src_install() {
48 if [ ${KV_MINOR} -gt 4 ]
49 then
50 MOD_SUFFIX="ko"
51 else
52 MOD_SUFFIX="o"
53 fi
54
55 dosbin ${S}/utils/ndiswrapper
56 dosbin ${S}/utils/ndiswrapper-buginfo
57
58 dodoc ${S}/README ${S}/INSTALL ${S}/AUTHORS ${S}/ChangeLog
59 doman ${S}/ndiswrapper.8
60
61 insinto /lib/modules/${KV}/misc
62 doins ${S}/driver/ndiswrapper.${MOD_SUFFIX}
63
64 into /
65 dosbin ${S}/utils/loadndisdriver
66
67 insinto /etc/modules.d
68 newins ${FILESDIR}/${PN}-0.9-modules.d ndiswrapper
69
70 dodir /etc/ndiswrapper
71 }
72
73 pkg_postinst() {
74 echo
75 einfo "Checking kernel module dependencies"
76 test -r "${ROOT}/usr/src/linux/System.map" && \
77 depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV}
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 einfo
85 einfo "As of release 0.9, you no longer have to call 'loadndiswrapper'"
86 einfo "explicitly. The module will handle it automatically."
87 einfo
88 einfo "check http://ndiswrapper.sf.net/supported_chipsets.html for drivers"
89 I=`lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4`
90 einfo "Look for the following on that page for your driver:"
91 einfo ${I}
92 einfo
93 einfo "Please have a look at http://ndiswrapper.sourceforge.net/wiki/"
94 einfo "for the FAQ, HowTos, Tips, Configuration, and installation"
95 einfo "information."
96 echo
97 }
98
99 pkg_config() {
100 ewarn "New versions of ndiswrapper do not require you to run config"
101
102 if [ ! -f "/etc/modules.d/ndiswrapper" ] ; then
103 eerror "/etc/modules.d/ndiswrapper not found. Please re-emerge"
104 eerror "${PN} to have this file installed, then re-run this script."
105 die "Driver configuration file not found!"
106 fi
107 }
108

  ViewVC Help
Powered by ViewVC 1.1.20