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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Fri Jun 8 11:44:49 2012 UTC (8 years, 2 months ago) by phajdan.jr
Branch: MAIN
Changes since 1.3: +2 -2 lines
x86 stable wrt bug #414919

(Portage version: 2.1.10.49/cvs/Linux i686)

1 angelos 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 phajdan.jr 1.4 # $Header: /var/cvsroot/gentoo-x86/net-wireless/ndiswrapper/ndiswrapper-1.57.ebuild,v 1.3 2012/05/26 07:51:29 ago Exp $
4 angelos 1.1
5     EAPI=4
6     inherit base linux-mod toolchain-funcs
7    
8     DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
9     HOMEPAGE="http://ndiswrapper.sourceforge.net/"
10     SRC_URI="mirror://sourceforge/${PN}/stable/${PV}/${P}.tar.gz"
11    
12     LICENSE="GPL-2"
13 phajdan.jr 1.4 KEYWORDS="amd64 x86"
14 angelos 1.1 IUSE="debug usb"
15    
16     DEPEND="sys-apps/pciutils"
17     RDEPEND="${DEPEND}
18     net-wireless/wireless-tools"
19    
20     PATCHES=( "${FILESDIR}"/${PN}-1.56-cflags.patch )
21     MODULE_NAMES="ndiswrapper(misc:${S}/driver)"
22     BUILD_TARGETS="all"
23     MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")
24    
25     pkg_pretend() {
26 angelos 1.2 CONFIG_CHECK="~WEXT_PRIV"
27     use usb && CONFIG_CHECK="${CONFIG_CHECK} ~USB"
28 angelos 1.1 ERROR_USB="You need to enable USB support in your kernel to use usb support in ndiswrapper."
29     ERROR_WEXT_PRIV="Your kernel does not support WEXT_PRIV. To enable it you need to enable a wireless driver that enables it, for example PRISM54 or IPW2200"
30     linux-mod_pkg_setup
31     }
32    
33     src_compile() {
34     local params
35    
36     # Enable verbose debugging information
37     if use debug; then
38     params="DEBUG=3"
39     use usb && params="${params} USB_DEBUG=1"
40     fi
41    
42     cd utils
43     emake CC=$(tc-getCC)
44    
45     use usb || params="${params} DISABLE_USB=1"
46    
47     BUILD_PARAMS="KSRC=${KV_DIR} KVERS=${KV_FULL} KBUILD='${KV_OUT_DIR}' ${params}"
48     linux-mod_src_compile
49     }
50    
51     src_install() {
52     dodoc AUTHORS ChangeLog INSTALL README
53     doman ndiswrapper.8
54    
55     keepdir /etc/ndiswrapper
56    
57     linux-mod_src_install
58    
59     cd utils
60     emake DESTDIR="${D}" install
61     }
62    
63     pkg_postinst() {
64     linux-mod_pkg_postinst
65    
66     echo
67     elog "NDISwrapper requires .inf and .sys files from a Windows(tm) driver"
68     elog "to function. Download these to /root for example, then"
69     elog "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
70     elog "They will be copied to /etc/ndiswrapper/."
71     elog "Once done, please run 'update-modules'."
72     echo
73    
74     elog "Please look at ${HOMEPAGE}"
75     elog "for the FAQ, HowTos, tips, configuration, and installation"
76     elog "information."
77     echo
78    
79     for i in $(lspci -n | egrep '(0280|0200):' | cut -d' ' -f1)
80     do
81     i_desc=$(lspci -nn | grep "$i" | awk -F': ' '{print $2}' | awk -F'[' '{print $1}')
82     if [[ -n "${i_desc}" ]] ; then
83     elog "Possible hardware: ${i_desc}"
84     fi
85     done
86    
87     echo
88     elog "NDISwrapper devs need support (_hardware_, cash)."
89     elog "Don't hesitate if you can help."
90     elog "See ${HOMEPAGE} for details."
91     echo
92    
93     if [[ ${ROOT} == "/" ]]; then
94    
95     einfo "Attempting to automatically reinstall any Windows drivers"
96     einfo "you might already have."
97     echo
98    
99     local driver
100     for driver in $(ls /etc/ndiswrapper) ; do
101     einfo "Driver: ${driver}"
102     mv "/etc/ndiswrapper/${driver}" "${T}"
103     ndiswrapper -i "${T}/${driver}/${driver}.inf"
104     done
105     fi
106     }

  ViewVC Help
Powered by ViewVC 1.1.20