]> Pileus Git - ~andy/sunrise/blob - net-wireless/rt73/rt73-1.0.3.6.ebuild
net-wireless/eeprom_93cx6: Drop old
[~andy/sunrise] / net-wireless / rt73 / rt73-1.0.3.6.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit linux-mod
6
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"
10
11 MY_P=RT73_Linux_STA_Drv${PV}
12
13 # May work on other little endien arches, e.g amd64
14 # Known broken on big endian arches
15 LICENSE="GPL-2"
16 KEYWORDS="~x86"
17 IUSE="debug"
18
19 S=${WORKDIR}/${MY_P}
20
21 RDEPEND="net-wireless/wireless-tools"
22 MODULE_NAMES="rt73(net:${S}/Module)"
23
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')
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
38         # Portage expects to do make module, not make all
39         # Only patch the makefile we are going to use
40
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
45         fi
46
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
51         fi
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"
55                 die
56         fi
57
58         # You can edit patch to also add your RT73 device if you are careful.
59         epatch "${FILESDIR}/deviceID.patch"
60 }
61
62 src_compile() {
63         use debug && export debug="y"
64         linux-mod_src_compile
65 }
66
67 src_install() {
68         linux-mod_src_install
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
73 }
74
75 pkg_postinst() {
76         linux-mod_pkg_postinst
77
78         einfo
79         einfo "Thanks to RaLink for releasing open drivers!"
80         einfo
81 }