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"
11 MY_P=RT73_Linux_STA_Drv${PV}
13 SRC_URI="http://www.ralink.com.tw/drivers/Linux/RT73_Linux_STA_Drv${PV}.tar.gz"
15 # May work on other little endien arches, e.g amd64 - known broken on big endian arches
19 RDEPEND="net-wireless/wireless-tools"
20 S="${WORKDIR}/${MY_P}"
21 MODULE_NAMES="rt73(net:${S}/Module)"
23 CONFIG_CHECK="NET_RADIO"
24 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}"
37 # Portage expects to do make module, not make all
38 # Only patch the makefile we are going to use
39 # Makefile.4 Makefile for kernel 2.4 series
40 if kernel_is 2 4 ; then
41 epatch ${FILESDIR}/make4.patch
42 cp Makefile.4 Makefile
45 # Makefile.6 Makefile for kernel 2.6 series
46 if kernel_is 2 6 ; then
47 epatch ${FILESDIR}/make6.patch
48 cp Makefile.6 Makefile
50 if ! [ -f Makefile ]; then
51 ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.X"
52 ewarn "this kernel version is not tested/supported"
56 # if you are really careful you can edit this patch to add your RT73 Device too
57 epatch ${FILESDIR}/deviceID.patch
62 use debug && export debug="y"
68 dodoc Module/README Module/iwpriv_usage.txt
69 # The firmware Install
70 insinto /etc/Wireless/RT73STA
71 doins Module/rt73.bin Module/rt73sta.dat
75 linux-mod_pkg_postinst
78 einfo "Thanks to RaLink for releasing open drivers!"