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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Oct 9 07:30:13 2004 UTC (15 years, 8 months ago) by cardoe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
revision bump to .11, stable .10 on x86, clean out old revisions

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.8.ebuild,v 1.2 2004/07/08 23:52:53 mr_bones_ Exp $
4
5 inherit kernel-mod
6
7 MY_P=${PN}-${PV}
8 S=${WORKDIR}/${MY_P}
9 DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
10 HOMEPAGE="http://ndiswrapper.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~x86"
16 IUSE=""
17 DEPEND="sys-devel/flex"
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 unset ARCH
38 emake || die
39 }
40
41 src_install() {
42 if [ ${KV_MINOR} -gt 4 ]
43 then
44 KV_OBJ="ko"
45 else
46 KV_OBJ="o"
47 fi
48
49 dobin ${S}/utils/loadndisdriver
50 dobin ${S}/utils/ndiswrapper
51
52 dodoc ${S}/README ${S}/INSTALL ${S}/AUTHORS
53
54 insinto /lib/modules/${KV}/misc
55 doins ${S}/driver/ndiswrapper.${KV_OBJ}
56
57 insinto /etc/modules.d
58 newins ${FILESDIR}/${PN}-0.6-modules.d ndiswrapper
59
60 dodir /etc/ndiswrapper
61 }
62
63 pkg_postinst() {
64 einfo "Checking kernel module dependancies"
65 test -r "${ROOT}/usr/src/linux/System.map" && \
66 depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV}
67
68 einfo
69 einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
70 einfo "to function. Put these somewhere like /usr/lib/hotplug/drivers,"
71 einfo "run 'ndiswrapper -i /usr/lib/hotplug/drivers/foo.inf', edit"
72 einfo "/etc/modules.d/ndiswrapper to add the path to subdirectory in"
73 einfo "/etc/ndiswrapper, then run 'update-modules'."
74 einfo
75 }
76
77 pkg_config() {
78 ewarn "New versions of ndiswrapper do not require you to run config"
79
80 if [ ! -f "/etc/modules.d/ndiswrapper" ]
81 then
82 eerror "/etc/modules.d/ndiswrapper not found. Please re-emerge"
83 eerror "${PN} to have this file installed, then re-run this script"
84 die "Driver configuration file not found"
85 fi
86
87 I=`lspci -n | grep 'Class 0280:' | cut -d' ' -f4`
88
89 if [ -z "${I}" ]
90 then
91 die "No suitable devices found"
92 fi
93 }

  ViewVC Help
Powered by ViewVC 1.1.20