# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit linux-mod DESCRIPTION="Driver for the RaLink RT61 wireless chipset" HOMEPAGE="http://www.ralinktech.com/" LICENSE="GPL-2" MY_P=${P/ralink_rt61-/RT61_Linux_STA_Drv} SRC_URI="http://www.ralinktech.com/drivers/Linux/${MY_P}.tar.gz" KEYWORDS="-* ~amd64 ~x86" IUSE="" SLOT="0" DEPEND="app-text/dos2unix" RDEPEND="net-wireless/wireless-tools net-wireless/ralink_rt61_fw" S="${WORKDIR}/${MY_P}" MODULE_NAMES="rt61(net:${S}/Module)" BUILD_TARGETS=" " MODULESD_RT61_ALIASES=('ra? rt61') CONFIG_CHECK="NET_RADIO" ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)." src_compile() { if [ $KV_MINOR = 6 ]; then cp Module/Makefile.6 Module/Makefile elif [ $KV_MINOR = 4 ]; then cp Module/Makefile.4 Module/Makefile else die "Your kernel version is not supported!" fi linux-mod_src_compile } src_install() { linux-mod_src_install dodoc Module/{ReleaseNote,STA_iwpriv_ATE_usage.txt} einfo "Running dos2unix on rt61sta.dat" dos2unix Module/rt61sta.dat || die "dos2unix failed" insinto /etc/Wireless/RT61STA insopts -m 0600 doins Module/rt61sta.dat }