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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Mar 12 15:16:24 2006 UTC (14 years, 5 months ago) by brix
Branch: MAIN
New snapshot, bug #125933.
(Portage version: 2.0.54)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
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 MODULESD_ATH_PCI_DOCS="README"
28
29 pkg_setup() {
30 linux-mod_pkg_setup
31
32 MODULE_NAMES="ath_hal(net:${S}/ath_hal)
33 wlan(net:${S}/net80211)
34 wlan_acl(net:${S}/net80211)
35 wlan_ccmp(net:${S}/net80211)
36 wlan_tkip(net:${S}/net80211)
37 wlan_wep(net:${S}/net80211)
38 wlan_xauth(net:${S}/net80211)
39 wlan_scan_sta(net:${S}/net80211)
40 wlan_scan_ap(net:${S}/net80211)"
41
42 BUILD_PARAMS="KERNELPATH=${KV_OUT_DIR}"
43
44 if use amrr && use onoe; then
45 eerror
46 eerror "USE=\"amrr onoe\" is invalid, you can only specify one at a time."
47 eerror
48 die "USE=\"amrr onoe\" is invalid"
49 fi
50
51 if use amrr; then
52 MODULE_NAMES="${MODULE_NAMES} ath_rate_amrr(net:${S}/ath_rate/amrr)"
53 BUILD_PARAMS="${BUILD_PARAMS} ATH_RATE=ath_rate/amrr"
54 elif use onoe; then
55 MODULE_NAMES="${MODULE_NAMES} ath_rate_onoe(net:${S}/ath_rate/onoe)"
56 BUILD_PARAMS="${BUILD_PARAMS} ATH_RATE=ath_rate/onoe"
57 else
58 MODULE_NAMES="${MODULE_NAMES} ath_rate_sample(net:${S}/ath_rate/sample)"
59 BUILD_PARAMS="${BUILD_PARAMS} ATH_RATE=ath_rate/sample"
60 fi
61
62 MODULE_NAMES="${MODULE_NAMES} ath_pci(net:${S}/ath)"
63 }
64
65 src_unpack() {
66 unpack ${A}
67
68 cd ${S}
69 for dir in ath ath_hal net80211 ath_rate/amrr ath_rate/onoe ath_rate/sample; do
70 convert_to_m ${S}/${dir}/Makefile
71 done
72 }
73
74 src_compile() {
75 # assists in debugging
76 emake KERNELPATH=${KV_OUT_DIR} info || die "emake info failed"
77
78 # needed by the modules
79 emake svnversion.h
80
81 linux-mod_src_compile
82 }
83
84 src_install() {
85 linux-mod_src_install
86
87 dodoc README THANKS docs/users-guide.pdf docs/WEP-HOWTO.txt
88
89 # install headers for use by
90 # net-wireless/wpa_supplicant and net-wireless/hostapd
91 insinto /usr/include/madwifi/include/
92 doins include/*.h
93 insinto /usr/include/madwifi/net80211
94 doins net80211/*.h
95 }
96
97 pkg_postinst() {
98 local moddir="${ROOT}/lib/modules/${KV_FULL}/net/"
99
100 einfo "Removing old ath_rate modules"
101 if use amrr; then
102 [[ -f "${moddir}/ath_rate_onoe.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_onoe.${KV_OBJ}"
103 [[ -f "${moddir}/ath_rate_sample.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_sample.${KV_OBJ}"
104 elif use onoe; then
105 [[ -f "${moddir}/ath_rate_amrr.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_amrr.${KV_OBJ}"
106 [[ -f "${moddir}/ath_rate_sample.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_sample.${KV_OBJ}"
107 else
108 [[ -f "${moddir}/ath_rate_amrr.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_amrr.${KV_OBJ}"
109 [[ -f "${moddir}/ath_rate_onoe.${KV_OBJ}" ]] && rm "${moddir}/ath_rate_onoe.${KV_OBJ}"
110 fi
111
112 linux-mod_pkg_postinst
113
114 einfo
115 einfo "Interfaces (athX) are now automatically created upon loading the ath_pci"
116 einfo "module."
117 einfo
118 einfo "The type of the created interface can be controlled through the 'autocreate'"
119 einfo "module parameter."
120 einfo
121 einfo "If you use net-wireless/wpa_supplicant or net-wireless/hostapd with madwifi"
122 einfo "you should remerge them now."
123 einfo
124 }

  ViewVC Help
Powered by ViewVC 1.1.20