# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit toolchain-funcs 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://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" pkg_setup() { unpack ${A} 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_compile() { #set_arch_to_kernel make || die "make 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 "Please note that this installation of at76c503 contains support" ewarn "for downloading binary firmware images into the non-volatile" ewarn "(permanent) flash memory of wireless LAN cards." ewarn "" ewarn "Albeit being a great feature, this can lead to A DEAD CARD" ewarn "when inappropriately used (e.g. wrong firmware)." ewarn "" } #pkg_postrm() { # #}