/[gentoo-x86]/net-wireless/madwifi-driver/madwifi-driver-0.1420.20060201.ebuild
Gentoo

Contents of /net-wireless/madwifi-driver/madwifi-driver-0.1420.20060201.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Apr 14 14:02:44 2006 UTC (14 years, 3 months ago) by brix
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Moved to net-wireless/madwifi-ng

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/madwifi-driver/madwifi-driver-0.1420.20060201.ebuild,v 1.2 2006/02/17 13:52:03 brix Exp $
4
5 inherit linux-mod
6
7 MY_P=madwifi-ng-r${PV:2:4}-${PV:7:8}
8 S=${WORKDIR}/${MY_P}
9
10 DESCRIPTION="Driver for Atheros based IEEE 802.11a/b/g wireless LAN cards"
11 HOMEPAGE="http://www.madwifi.org/"
12 SRC_URI="http://snapshots.madwifi.org/madwifi-ng/${MY_P}.tar.gz"
13
14 LICENSE="|| ( BSD GPL-2 )"
15 SLOT="0"
16 KEYWORDS="~amd64 ~ppc ~x86"
17
18 IUSE="amrr onoe"
19 DEPEND="app-arch/sharutils"
20 RDEPEND=">=net-wireless/madwifi-tools-${PV}"
21
22 CONFIG_CHECK="CRYPTO NET_RADIO SYSCTL"
23 ERROR_CRYPTO="${P} requires Cryptographic API support (CONFIG_CRYPTO)."
24 ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
25 ERROR_SYSCTL="${P} requires Sysctl support (CONFIG_SYSCTL)."
26 BUILD_TARGETS="all"
27
28 pkg_setup() {
29 linux-mod_pkg_setup
30
31 MODULE_NAMES="ath_hal(net:${S}/ath_hal)
32 wlan(net:${S}/net80211)
33 wlan_acl(net:${S}/net80211)
34 wlan_ccmp(net:${S}/net80211)
35 wlan_tkip(net:${S}/net80211)
36 wlan_wep(net:${S}/net80211)
37 wlan_xauth(net:${S}/net80211)
38 wlan_scan_sta(net:${S}/net80211)
39 wlan_scan_ap(net:${S}/net80211)"
40
41 BUILD_PARAMS="KERNELPATH=${KV_OUT_DIR}"
42
43 if use amrr && use onoe; then
44 eerror
45 eerror "USE=\"amrr onoe\" is invalid, you can only specify one at a time."
46 eerror
47 die "USE=\"amrr onoe\" is invalid"
48 fi
49
50 if use amrr; then
51 MODULE_NAMES="${MODULE_NAMES} ath_rate_amrr(net:${S}/ath_rate/amrr)"
52 BUILD_PARAMS="${BUILD_PARAMS} ATH_RATE=ath_rate/amrr"
53 elif use onoe; then
54 MODULE_NAMES="${MODULE_NAMES} ath_rate_onoe(net:${S}/ath_rate/onoe)"
55 BUILD_PARAMS="${BUILD_PARAMS} ATH_RATE=ath_rate/onoe"
56 else
57 MODULE_NAMES="${MODULE_NAMES} ath_rate_sample(net:${S}/ath_rate/sample)"
58 BUILD_PARAMS="${BUILD_PARAMS} ATH_RATE=ath_rate/sample"
59 fi
60
61 MODULE_NAMES="${MODULE_NAMES} ath_pci(net:${S}/ath)"
62 }
63
64 src_unpack() {
65 unpack ${A}
66
67 cd ${S}
68 for dir in ath ath_hal net80211 ath_rate/amrr ath_rate/onoe ath_rate/sample; do
69 convert_to_m ${S}/${dir}/Makefile
70 done
71 }
72
73 src_compile() {
74 # assists in debugging
75 emake KERNELPATH=${KV_OUT_DIR} info || die "emake info failed"
76
77 linux-mod_src_compile
78 }
79
80 src_install() {
81 linux-mod_src_install
82
83 dodoc README THANKS docs/users-guide.pdf docs/WEP-HOWTO.txt
84
85 # install headers for use by
86 # net-wireless/wpa_supplicant and net-wireless/hostapd
87 insinto /usr/include/madwifi/include/
88 doins include/*.h
89 insinto /usr/include/madwifi/net80211
90 doins net80211/*.h
91 }
92
93 pkg_postinst() {
94 local moddir="${ROOT}/lib/modules/${KV_FULL}/net/"
95
96 einfo "Removing old ath_rate modules"
97 if use amrr; then
98 [[ -f "${moddir}/ath_rate_onoe.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_onoe.${KV_OBJ}"
99 [[ -f "${moddir}/ath_rate_sample.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_sample.${KV_OBJ}"
100 elif use onoe; then
101 [[ -f "${moddir}/ath_rate_amrr.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_amrr.${KV_OBJ}"
102 [[ -f "${moddir}/ath_rate_sample.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_sample.${KV_OBJ}"
103 else
104 [[ -f "${moddir}/ath_rate_amrr.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_amrr.${KV_OBJ}"
105 [[ -f "${moddir}/ath_rate_onoe.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_onoe.${KV_OBJ}"
106 fi
107
108 linux-mod_pkg_postinst
109
110 einfo
111 einfo "If you use net-wireless/wpa_supplicant or net-wireless/hostapd with madwifi"
112 einfo "you should remerge them now."
113 einfo
114 }

  ViewVC Help
Powered by ViewVC 1.1.20