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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 agriffis 1.2 # Copyright 1999-2004 Gentoo Foundation
2 latexer 1.1 # Distributed under the terms of the GNU General Public License v2
3 cardoe 1.4 # $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-0.6-r1.ebuild,v 1.3 2004/07/08 03:20:08 latexer Exp $
4 latexer 1.1
5     inherit kernel-mod
6    
7     S=${WORKDIR}/${P}
8     DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
9     HOMEPAGE="http://ndiswrapper.sourceforge.net/"
10     SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11    
12     LICENSE="GPL-2"
13     SLOT="0"
14     KEYWORDS="~x86"
15     IUSE=""
16     DEPEND="sys-devel/flex"
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    
29     src_compile() {
30     # Unset ARCH for 2.5/2.6 kernel compiles
31     unset ARCH
32     emake || die
33     }
34    
35     src_install() {
36     if [ ${KV_MINOR} -gt 4 ]
37     then
38     KV_OBJ="ko"
39     else
40     KV_OBJ="o"
41     fi
42    
43     dobin ${S}/utils/loadndisdriver
44     dobin ${S}/utils/ndiswrapper
45    
46     dodoc ${S}/README ${S}/INSTALL ${S}/AUTHORS
47    
48     insinto /lib/modules/${KV}/misc
49     doins ${S}/driver/ndiswrapper.${KV_OBJ}
50    
51     insinto /etc/modules.d
52     newins ${FILESDIR}/${P}-modules.d ndiswrapper
53    
54     dodir /etc/ndiswrapper
55     }
56    
57     pkg_postinst() {
58     kernel-mod_pkg_postinst
59    
60     einfo
61     einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
62     einfo "to function. Put these somewhere like /usr/lib/hotplug/drivers,"
63     einfo "run 'ndiswrapper -i /usr/lib/hotplug/drivers/foo.inf', edit"
64     einfo "/etc/modules.d/ndiswrapper to add the path to subdirectory in"
65     einfo "/etc/ndiswrapper, then run 'update-modules'."
66     einfo
67     }
68    
69     pkg_config() {
70     ewarn "New versions of ndiswrapper do not require you to run config"
71    
72     if [ ! -f "/etc/modules.d/ndiswrapper" ]
73     then
74     eerror "/etc/modules.d/ndiswrapper not found. Please re-emerge"
75     eerror "${PN} to have this file installed, then re-run this script"
76     die "Driver configuration file not found"
77     fi
78    
79     I=`lspci -n | grep 'Class 0280:' | cut -d' ' -f4`
80    
81     if [ -z "${I}" ]
82     then
83     die "No suitable devices found"
84     fi
85     }

  ViewVC Help
Powered by ViewVC 1.1.20