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

Contents of /net-wireless/ndiswrapper/ndiswrapper-1.58_rc1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Mar 22 11:49:03 2014 UTC (6 years, 3 months ago) by angelos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump, remove old

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key )

1 # Copyright 1999-2013 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.58_rc1.ebuild,v 1.3 2013/01/19 21:21:08 angelos Exp $
4
5 EAPI=4
6 inherit base linux-mod toolchain-funcs
7
8 MY_PV=${PV/_}
9 DESCRIPTION="Wrapper for using Windows drivers for some wireless cards"
10 HOMEPAGE="http://ndiswrapper.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/testing/${PN}-${MY_PV}.tar.gz"
12
13 LICENSE="GPL-2"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="debug usb"
16
17 DEPEND="sys-apps/pciutils"
18 RDEPEND="${DEPEND}
19 net-wireless/wireless-tools"
20
21 S=${WORKDIR}/${PN}-${MY_PV}
22
23 PATCHES=( "${FILESDIR}"/${PN}-1.56-cflags.patch )
24 MODULE_NAMES="ndiswrapper(misc:${S}/driver)"
25 BUILD_TARGETS="all"
26 MODULESD_NDISWRAPPER_ALIASES=("wlan0 ndiswrapper")
27
28 pkg_pretend() {
29 CONFIG_CHECK="~WEXT_PRIV"
30 use usb && CONFIG_CHECK="${CONFIG_CHECK} ~USB"
31 ERROR_USB="You need to enable USB support in your kernel to use usb support in ndiswrapper."
32 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"
33 linux-mod_pkg_setup
34 }
35
36 src_prepare() {
37 base_src_prepare
38
39 # Linux 3.7 fix by Philip Müller <philm@manjaro.org>
40 sed -i "s|/include/linux/version.h|/include/generated/uapi/linux/version.h|g" driver/Makefile
41 }
42
43 src_compile() {
44 local params="WRAP_WQ=1"
45
46 # Enable verbose debugging information
47 if use debug; then
48 params="${params} DEBUG=3"
49 use usb && params="${params} USB_DEBUG=1"
50 fi
51
52 cd utils
53 emake CC=$(tc-getCC)
54
55 use usb || params="${params} DISABLE_USB=1"
56
57 BUILD_PARAMS="KSRC=${KV_DIR} KVERS=${KV_FULL} KBUILD='${KV_OUT_DIR}' ${params}"
58 linux-mod_src_compile
59 }
60
61 src_install() {
62 dodoc AUTHORS ChangeLog INSTALL README
63 doman ndiswrapper.8
64
65 keepdir /etc/ndiswrapper
66
67 linux-mod_src_install
68
69 cd utils
70 emake DESTDIR="${D}" install
71 }
72
73 pkg_postinst() {
74 linux-mod_pkg_postinst
75
76 echo
77 elog "NDISwrapper requires .inf and .sys files from a Windows(tm) driver"
78 elog "to function. Download these to /root for example, then"
79 elog "run 'ndiswrapper -i /root/foo.inf'. After that you can delete them."
80 elog "They will be copied to /etc/ndiswrapper/."
81 elog "Once done, please run 'update-modules'."
82 echo
83
84 elog "Please look at ${HOMEPAGE}"
85 elog "for the FAQ, HowTos, tips, configuration, and installation"
86 elog "information."
87 echo
88
89 for i in $(lspci -n | egrep '(0280|0200):' | cut -d' ' -f1)
90 do
91 i_desc=$(lspci -nn | grep "$i" | awk -F': ' '{print $2}' | awk -F'[' '{print $1}')
92 if [[ -n "${i_desc}" ]] ; then
93 elog "Possible hardware: ${i_desc}"
94 fi
95 done
96
97 echo
98 elog "NDISwrapper devs need support (_hardware_, cash)."
99 elog "Don't hesitate if you can help."
100 elog "See ${HOMEPAGE} for details."
101 echo
102
103 if [[ ${ROOT} == "/" ]]; then
104
105 einfo "Attempting to automatically reinstall any Windows drivers"
106 einfo "you might already have."
107 echo
108
109 local driver
110 for driver in $(ls /etc/ndiswrapper) ; do
111 einfo "Driver: ${driver}"
112 mv "/etc/ndiswrapper/${driver}" "${T}"
113 ndiswrapper -i "${T}/${driver}/${driver}.inf"
114 done
115 fi
116 }

  ViewVC Help
Powered by ViewVC 1.1.20