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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Apr 14 14:02:44 2006 UTC (14 years, 2 months ago) by brix
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +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.1401.20060117.ebuild,v 1.3 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 # make fails to determine TARGET if ARCH is set
75 unset ARCH
76
77 # assists in debugging
78 emake KERNELPATH=${KV_OUT_DIR} info || die "emake info failed"
79
80 linux-mod_src_compile
81
82 set_arch_to_portage
83 }
84
85 src_install() {
86 linux-mod_src_install
87
88 dodoc README THANKS docs/users-guide.pdf docs/WEP-HOWTO.txt
89
90 # install headers for use by
91 # net-wireless/wpa_supplicant and net-wireless/hostapd
92 insinto /usr/include/madwifi/include/
93 doins include/*.h
94 insinto /usr/include/madwifi/net80211
95 doins net80211/*.h
96 }
97
98 pkg_postinst() {
99 local moddir="${ROOT}/lib/modules/${KV_FULL}/net/"
100
101 einfo "Removing old ath_rate modules"
102 if use amrr; then
103 [[ -f "${moddir}/ath_rate_onoe.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_onoe.${KV_OBJ}"
104 [[ -f "${moddir}/ath_rate_sample.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_sample.${KV_OBJ}"
105 elif use onoe; then
106 [[ -f "${moddir}/ath_rate_amrr.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_amrr.${KV_OBJ}"
107 [[ -f "${moddir}/ath_rate_sample.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_sample.${KV_OBJ}"
108 else
109 [[ -f "${moddir}/ath_rate_amrr.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_amrr.${KV_OBJ}"
110 [[ -f "${moddir}/ath_rate_onoe.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_onoe.${KV_OBJ}"
111 fi
112
113 linux-mod_pkg_postinst
114
115 einfo
116 einfo "If you use net-wireless/wpa_supplicant or net-wireless/hostapd with madwifi"
117 einfo "you should remerge them now."
118 einfo
119 }

  ViewVC Help
Powered by ViewVC 1.1.20