1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="Driver for the RaLink RT73/2571 wireless chipsets"
8 HOMEPAGE="http://www.ralink.com.tw/"
9 SRC_URI="http://ralink.com.tw/data/RT73_Linux_STA_Drv${PV}.tar.gz"
11 MY_P=RT73_Linux_STA_Drv${PV}
13 # May work on other little endien arches, e.g amd64
14 # Known broken on big endian arches
21 RDEPEND="net-wireless/wireless-tools"
22 MODULE_NAMES="rt73(net:${S}/Module)"
24 CONFIG_CHECK="WIRELESS_EXT"
25 ERROR_WIRELESS_EXT="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
26 MODULESD_RT73_ALIASES=('usbra? rt73')
30 BUILD_PARAMS="KERNDIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
38 # Portage expects to do make module, not make all
39 # Only patch the makefile we are going to use
41 # Makefile.4 - Makefile for kernel 2.4 series
42 if kernel_is 2 4 ; then
43 epatch "${FILESDIR}/make4.patch"
44 cp Makefile.4 Makefile
47 # Makefile.6 - Makefile for kernel 2.6 series
48 if kernel_is 2 6 ; then
49 epatch "${FILESDIR}/make6.patch"
50 cp Makefile.6 Makefile
52 if ! [ -f Makefile ]; then
53 ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.X"
54 ewarn "this kernel version is not tested/supported"
58 # You can edit patch to also add your RT73 device if you are careful.
59 epatch "${FILESDIR}/deviceID.patch"
63 use debug && export debug="y"
69 dodoc Module/README Module/iwpriv_usage.txt
70 # The firmware install
71 insinto /etc/Wireless/RT73STA
72 doins Module/rt73.bin Module/rt73sta.dat
76 linux-mod_pkg_postinst
79 einfo "Thanks to RaLink for releasing open drivers!"