1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit versionator toolchain-funcs
10 MY_PV=$(get_version_component_range 1-3)
11 MY_REV=$(get_version_component_range 4)
12 MY_DATE=$(get_version_component_range 5)
13 MY_P=${MY_PN}-${MY_PV}-r${MY_REV}-${MY_DATE}
14 S=${WORKDIR}/${MY_P}/tools
16 DESCRIPTION="Next Generation tools for configuration of Atheros based IEEE 802.11a/b/g wireless LAN cards"
17 HOMEPAGE="http://www.madwifi-project.org/"
18 SRC_URI="http://snapshots.madwifi-project.org/${MY_PN}-${MY_PV}/${MY_P}.tar.gz"
20 LICENSE="|| ( BSD GPL-2 )"
22 KEYWORDS="amd64 ppc x86"
26 RDEPEND="!net-wireless/madwifi-old-tools"
29 # format string fix from solar
31 # -e 's:err(1, ifr.ifr_name);:err(1, "%s", ifr.ifr_name);:g' \
32 # ${S}/tools/athstats.c || die
35 -e "s:CC =.*:CC = $(tc-getCC):" \
36 -e "s:CFLAGS=:CFLAGS+=:" \
37 -e "s:LDFLAGS=:LDFLAGS+=:" \
38 "${S}"/Makefile || die
42 emake DESTDIR="${D}" BINDIR=/usr/bin MANDIR=/usr/share/man STRIP=echo \
43 install || die "emake install failed"
46 mv "${D}"/usr/bin/wlanconfig "${D}"/sbin
48 # install headers for use by
49 # net-wireless/wpa_supplicant and net-wireless/hostapd
51 insinto /usr/include/madwifi/include/
53 insinto /usr/include/madwifi/net80211
58 if [ -e "${ROOT}"/etc/udev/rules.d/65-madwifi.rules ]; then
60 ewarn "The udev rules for creating interfaces (athX) are no longer needed."
62 ewarn "You should manually remove the /etc/udev/rules.d/65-madwifi.rules file"
63 ewarn "and either run 'udevstart' or reboot for the changes to take effect."
67 einfo "If you use net-wireless/wpa_supplicant or net-wireless/hostapd with madwifi"
68 einfo "you should remerge them now."