# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit toolchain-funcs cvs DESCRIPTION="at76c503 is a Linux driver for the wlan USB adapter based on the Atmel at76c503 chip. It currently supports ad-hoc mode, infrastructure mode, and WEP. It supports adapters from Atmel, the Belkin F5D6050, Netgear MA101, and others." HOMEPAGE="http://at76c503a.berlios.de" #http://download.berlios.de/at76c503a/at76c503-0.11.tar.gz SRC_URI="http://cvs.berlios.de/cvstarballs/at76c503a-cvsroot.tar.gz" #ebuild at76c503-20040119.ebuild digest #"http://download.berlios.de/at76c503a/${P}.tar.gz" LICENSE="GPL" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="usb" DEPEND="virtual/linux-sources" RDEPEND=">=sys-apps/hotplug-20040923 >=net-wireless/wireless-tools-26-r1" #This CVS stuff doesn't work yet, it takes the cvs snapshot from above ECVS_AUTH="anoncvs" ECVS_SERVER="cvs.berlios.de:/cvsroot/at76c503a" ECVS_PASS="anonymous" ECVS_MODULE="at76c503" ECVS_TOP_DIR="${DISTDIR}/cvs-src/${P}" S="${WORKDIR}/${ECVS_MODULE}" #Not sure if these are all the module names, I am not my machine which has it installed. MODULE_NAMES="at76c503(net:) at76c503_rfmd(net:) at76c503_i3861(net:) at76c503_i3863(net:) at76c503_usbdfu(net:)" #MODULESD_IPW2100_DOCS="README.ipw2100" #Same as the pkg_setup() code. #CONFIG_CHECK="NET_RADIO FW_LOADER" #NET_RADIO_ERROR="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)." #FW_LOADER_ERROR="${P} requires Hotplug firmware loading support (CONFIG_FW_LOADER)." pkg_setup() { local DIE=0 if ! kernel-mod_configoption_present NET_RADIO then eerror "" eerror "${P} requires support for Wireless LAN drivers (non-hamradio) &" eerror "Wireless Extensions (CONFIG_NET_RADIO) in the kernel." eerror "" die "CONFIG_NET_RADIO support not detected." fi kernel-mod_check_modules_supported } src_unpack() { if [ "${ECVS_SERVER}" == "offline" ] ; then einfo "cvs server is offline, using a mirror." #unpack ${A} #The source downloaded is a snapshot of cvs, so it should run cvs_src_unpack either way cvs_src_unpack else cvs_src_unpack fi } src_compile() { #set_arch_to_kernel emake || die "emake failed" #set_arch_to_portage } src_install() { # Makefile relies on existing /lib/modules/${KV} #dodir /lib/modules/${KV} #set_arch_to_kernel #If you have used the Sourceforge driver before, you must manually remove its modules: find /lib/modules/`uname -r`/ -name "usbvnet[5r]*" -exec rm {} \; make install || die "make install failed" #set_arch_to_portage dodoc README COPYING CHANGELOG } pkg_postinst() { einfo "Checking kernel module dependencies" test -r "${ROOT}/usr/src/linux/System.map" && \ depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV} einfo "" einfo "Please notice that all ${PN} modules are now installed to" einfo "/lib/modules/${KV}/net/." einfo "" einfo "" einfo "If the module is not automatically loaded at startup," einfo "you may need to edit /etc/modules.autoload/kernel-2.6" einfo "and supply the module name that needs to load:" einfo "at76c503_i3861 for example" einfo "" ewarn "" ewarn "For more information on configuring the wireless card," ewarn "please visit: http://at76c503a.berlios.de/support.html#install" ewarn "" } #pkg_postrm() { # #}