732cb7cbe9
git-svn-id: http://svn.sabayonlinux.org/overlay@93 d7aec97c-591d-0410-af39-a8856400b30a
93 lines
2.2 KiB
Bash
93 lines
2.2 KiB
Bash
# Copyright 1999-2006 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $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 $
|
|
|
|
inherit linux-mod
|
|
|
|
DESCRIPTION="Driver for the RaLink RT73/2571 wireless chipsets"
|
|
HOMEPAGE="http://www.ralink.com.tw"
|
|
SRC_URI="http://www.ralink.com.tw/drivers/Linux/RT73_Linux_STA_Drv${PV}.tar.gz"
|
|
|
|
MY_P=RT73_Linux_STA_Drv${PV}
|
|
|
|
# May work on other little endien arches, e.g amd64
|
|
# Known broken on big endian arches
|
|
LICENSE="GPL-2"
|
|
KEYWORDS="~x86 ~amd64"
|
|
IUSE="debug"
|
|
|
|
RDEPEND="net-wireless/wireless-tools"
|
|
MODULE_NAMES="rt73(net:${S}/Module)"
|
|
|
|
#S=${WORKDIR}/${MY_P}
|
|
|
|
CONFIG_CHECK="NET_RADIO"
|
|
ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
|
|
MODULESD_RT73_ALIASES=('usbra? rt73')
|
|
|
|
pkg_setup() {
|
|
BUILD_PARAMS="KERNDIR=${KV_DIR} KERNOUT=${KV_OUT_DIR} objdir=${S}"
|
|
linux-mod_pkg_setup
|
|
}
|
|
|
|
src_unpack (){
|
|
unpack ${A}
|
|
mv ${WORKDIR}/${MY_P} ${WORKDIR}/${P}
|
|
cd "${S}/Module"
|
|
|
|
# Portage expects to do make module, not make all
|
|
# Only patch the makefile we are going to use
|
|
|
|
# Makefile.4 - Makefile for kernel 2.4 series
|
|
if kernel_is 2 4 ; then
|
|
epatch "${FILESDIR}/make4.patch"
|
|
cp Makefile.4 Makefile
|
|
fi
|
|
|
|
# Makefile.6 - Makefile for kernel 2.6 series
|
|
if kernel_is 2 6 ; then
|
|
epatch "${FILESDIR}/make6.patch"
|
|
cp Makefile.6 Makefile
|
|
fi
|
|
if ! [ -f Makefile ]; then
|
|
ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.X"
|
|
ewarn "this kernel version is not tested/supported"
|
|
die
|
|
fi
|
|
|
|
# You can edit patch to also add your RT73 device if you are careful.
|
|
epatch "${FILESDIR}/deviceID.patch"
|
|
|
|
# x86_64 support
|
|
if use amd64; then
|
|
epatch "${FILESDIR}/amd64-buildfix.patch"
|
|
fi
|
|
|
|
# Better Gentoo support (mostly inside catalyst)
|
|
sed -i 's/$(shell uname -r)/'${KV_FULL}'/' Makefile
|
|
|
|
}
|
|
|
|
|
|
src_compile() {
|
|
use debug && export debug="y"
|
|
cd "${S}/Module"
|
|
linux-mod_src_compile
|
|
}
|
|
|
|
src_install() {
|
|
linux-mod_src_install
|
|
dodoc Module/README Module/iwpriv_usage.txt
|
|
# The firmware install
|
|
insinto /etc/Wireless/RT73STA
|
|
doins Module/rt73.bin Module/rt73sta.dat
|
|
}
|
|
|
|
pkg_postinst() {
|
|
linux-mod_pkg_postinst
|
|
|
|
einfo
|
|
einfo "Thanks to RaLink for releasing open drivers!"
|
|
einfo
|
|
}
|