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/rt61/rt61-1.1.0_beta1.ebuild,v 1.1 2006/07/01 12:12:16 genstef Exp $
7 DESCRIPTION="Driver for the RaLink RT73/2571 wireless chipsets"
8 HOMEPAGE="http://www.ralink.com.tw/"
9 SRC_URI="http://www.ralink.com.tw/drivers/Linux/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
19 RDEPEND="net-wireless/wireless-tools"
20 MODULE_NAMES="rt73(net:${S}/Module)"
24 CONFIG_CHECK="NET_RADIO"
25 ERROR_NET_RADIO="${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"
64 use debug && export debug="y"
70 dodoc Module/README Module/iwpriv_usage.txt
71 # The firmware install
72 insinto /etc/Wireless/RT73STA
73 doins Module/rt73.bin Module/rt73sta.dat
77 linux-mod_pkg_postinst
80 einfo "Thanks to RaLink for releasing open drivers!"