]> Pileus Git - ~andy/sunrise/blob - net-wireless/rt73/rt73-1.0.3.6.ebuild
85b71e8f1e31b7d61b1b8931188b044897b5fd34
[~andy/sunrise] / net-wireless / rt73 / rt73-1.0.3.6.ebuild
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 $
4
5 inherit linux-mod
6
7 DESCRIPTION="Driver for the RaLink RT73/2571 wireless chipsets"
8 HOMEPAGE="http://www.ralink.com.tw"
9 LICENSE="GPL-2"
10
11 MY_P=RT73_Linux_STA_Drv${PV}
12
13 SRC_URI="http://www.ralink.com.tw/drivers/Linux/RT73_Linux_STA_Drv${PV}.tar.gz"
14
15 # May work on other little endien arches, e.g amd64 - known broken on big endian arches
16
17 KEYWORDS="~x86"
18 IUSE="debug"
19 RDEPEND="net-wireless/wireless-tools"
20 S="${WORKDIR}/${MY_P}"
21 MODULE_NAMES="rt73(net:${S}/Module)"
22
23 CONFIG_CHECK="NET_RADIO"
24 ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
25
26 MODULESD_RT73_ALIASES=('usbra? rt73')
27
28 pkg_setup() {
29         linux-mod_pkg_setup
30         BUILD_PARAMS="KERNDIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
31
32 }
33
34 src_unpack (){
35         unpack ${A}
36         cd ${S}/Module
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
43         fi
44
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
49         fi
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"
53                 die
54         fi
55
56 #       if you are really careful you can edit this patch to add your RT73 Device too
57         epatch ${FILESDIR}/deviceID.patch
58 }
59
60
61 src_compile() {
62         use debug && export debug="y"
63         linux-mod_src_compile
64 }
65
66 src_install() {
67         linux-mod_src_install
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
72 }
73
74 pkg_postinst() {
75         linux-mod_pkg_postinst
76
77         einfo
78         einfo "Thanks to RaLink for releasing open drivers!"
79         einfo
80 }