summaryrefslogtreecommitdiff
blob: 9e62e580afddf7c2685db8da3d1322b961ec0691 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-wireless/rt2x00/rt2x00-9999.ebuild,v 1.6 2006/05/26 15:32:48 uberlord Exp $

inherit linux-mod cvs

DESCRIPTION="Driver for the RaLink RT2x00 wireless chipsets"
HOMEPAGE="http://rt2x00.serialmonkey.com"
LICENSE="GPL-2"

ECVS_SERVER="rt2400.cvs.sourceforge.net:/cvsroot/rt2400"
ECVS_MODULE="source/rt2x00"
ECVS_LOCALNAME="${P}"

KEYWORDS="-* ~amd64 ~x86"
IUSE="debug"
RDEPEND="net-wireless/wireless-tools"

MODULE_NAMES="
	80211(rt2x00:)
	radiobtn(rt2x00:)
	rate_control(rt2x00:)
	rt2400pci(rt2x00:)
	rt2500pci(rt2x00:)
	rt2500usb(rt2x00:)
	rt61pci(rt2x00:)
	rt73usb(rt2x00:)"

CONFIG_CHECK="NET_RADIO"
ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."

CONFIG_CHECK="FW_LOADER"
ERROR_NET_RADIO="${P} requires support for Firmware module loading (CONFIG_FW_LOADER)."

pkg_setup() {
	kernel_is lt 2 6 13 && die "${P} requires at least kernel 2.6.13"
	linux-mod_pkg_setup
	BUILD_PARAMS="KERNDIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
	BUILD_TARGETS=" " # Target "module" is not supported, so we blank it
}

src_compile() {
	local m= d="n"
	use debug && debug="y"

	# Build everything except ASM files
	# Maybe have USE flags for each driver at some point?
	for m in RT2400PCI RT2500PCI RT2500USB RT61PCI RT73USB \
	D80211 RADIOBTN ; do
		echo "CONFIG_${m}=y" >> config
		echo "CONFIG_${m}_ASM=n" >> config
		echo "CONFIG_${m}_DEBUG=${debug}" >> config
		echo "CONFIG_${m}_BUTTON=y" >> config
	done

	linux-mod_src_compile
}

src_install() {
	linux-mod_src_install
	dodoc CHANGELOG COPYING README THANKS
}

pkg_postinst() {
	linux-mod_pkg_postinst

	ewarn
	ewarn "This is a CVS ebuild - please report any bugs to the rt2x00 forums"
	ewarn "http://rt2x00.serialmonkey.com/phpBB2/viewforum.php?f=5"
	ewarn
	ewarn "Any bugs reported to Gentoo will be marked INVALID"
	ewarn
}