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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun May 28 11:17:20 2006 UTC (14 years, 1 month ago) by betelgeuse
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Removed old versions.
(Portage version: 2.1_rc2-r2)
 (Signed Manifest commit)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-1.13.ebuild,v 1.1 2006/04/11 15:40:00 betelgeuse Exp $
4
5 inherit eutils linux-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}/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 KEYWORDS="~x86 ~amd64"
13
14 IUSE="debug usb"
15 DEPEND="sys-apps/pciutils"
16 RDEPEND="${DEPEND}
17 net-wireless/wireless-tools"
18
19 CONFIG_CHECK="NET_RADIO"
20
21 MODULE_NAMES="ndiswrapper(misc:${S}/driver)"
22 BUILD_PARAMS="KSRC=${ROOT}${KV_DIR} KVERS=${KV_FULL}"
23 BUILD_TARGETS="all"
24 MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")
25
26 ERROR_USB="You need to enable USB support in your kernel
27 to use usb support in ndiswrapper."
28
29 pkg_setup() {
30 einfo "See http://www.gentoo.org/doc/en/gentoo-kernel.xml for a list of supported kernels."
31 echo ""
32 use usb && CONFIG_CHECK="${CONFIG_CHECK} USB"
33 linux-mod_pkg_setup
34 }
35
36 src_unpack() {
37 unpack ${A}
38 cd ${S}
39 epatch ${FILESDIR}/${PN}-1.2-suspend2.patch || die "suspend2 patch failed"
40
41 convert_to_m ${S}/driver/Makefile
42 }
43
44 src_compile() {
45 # Enable verbose debugging information
46 use debug && export DEBUG=3
47
48 cd utils
49 emake || die "Compile of utils failed!"
50
51 local params
52 use usb || params="DISABLE_USB=1"
53
54 BUILD_PARAMS="${BUILD_PARAMS} ${params}" linux-mod_src_compile
55 }
56
57 src_install() {
58 dodoc README INSTALL AUTHORS ChangeLog
59 doman ndiswrapper.8
60
61 keepdir /etc/ndiswrapper
62
63 linux-mod_src_install
64
65 cd utils
66 make DESTDIR="${D}" install
67 }
68
69 pkg_postinst() {
70 linux-mod_pkg_postinst
71 echo
72 einfo "ndiswrapper requires .inf and .sys files from a Windows(tm) driver"
73 einfo "to function. Download these to /root for example, then"
74 einfo "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
75 einfo "They will be copied to the proper location."
76 einfo "Once done, please run 'update-modules'."
77 echo
78 einfo "check http://ndiswrapper.sf.net/mediawiki/index.php/List for drivers"
79 I=$(lspci -n | egrep 'Class (0280|0200):' | cut -d' ' -f4)
80 einfo "Look for the following on that page for your driver:"
81 einfo "Possible Hardware: ${I}"
82 echo
83 einfo "Please have a look at http://ndiswrapper.sourceforge.net/wiki/"
84 einfo "for the FAQ, HowTos, Tips, Configuration, and installation"
85 einfo "information."
86 echo
87 ewarn "Attempting to automatically reinstall any Windows drivers"
88 ewarn "you might already have."
89 for driver in $(ls /etc/ndiswrapper)
90 do
91 einfo "Driver: ${driver}"
92 mv /etc/ndiswrapper/${driver} /tmp
93 ndiswrapper -i /tmp/${driver}/${driver}.inf
94 done
95 }

  ViewVC Help
Powered by ViewVC 1.1.20