# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: inherit kernel-mod eutils FIX_V=3 FW_V=307 DESCRIPTION="Driver for the ACX100 wireless chipset" HOMEPAGE="http://acx100.sourceforge.net/" SRC_URI="http://lisas.de/~andi/${PN}/${P/_/}_plus_fixes_${FIX_V}.tar.bz2 ftp://ftp.dlink.com/Wireless/dwl520+/Driver/dwl520+_drivers_${FW_V}.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" DEPEND="virtual/kernel" RDEPEND=">=sys-apps/hotplug-20030805-r2 net-wireless/wireless-tools" S=${WORKDIR}/${P/_/}_plus_fixes_${FIX_V} FW_S=${WORKDIR}/tempfirmware # TODO: # - check for 2.4 kernels # - change modprobe.conf for acx100 options # - get it running with hotplug src_unpack() { check_KV if ! egrep "^CONFIG_NET_WIRELESS=[ym]" ${ROOT}/usr/src/linux/.config >/dev/null then eerror "This is a wireless driver, so you need wireless support." eerror "Device Drivers --->" eerror " Networking support --->" eerror " Wireless LAN (non-hamradio) --->" eerror " [*] Wireless LAN drivers (non-hamradio) & Wireless Extensions" die "Wireless support needed." else einfo "Wireless support found." fi if ! egrep "^CONFIG_FW_LOADER=[ym]" ${ROOT}/usr/src/linux/.config >/dev/null then eerror "This driver loads an external firmware, so you need firmware loading support." eerror "Device Drivers --->" eerror " Generic Driver Options --->" eerror " <*> Hotplug firmware loading support" die "Firmware loading support needed." else einfo "Wireless (non-hamradio) support found." fi if egrep "^CONFIG_SMP=[ym]" ${ROOT}/usr/src/linux/.config >/dev/null then eerror "This driver does not work on SMP machines, so you need to disable the support." eerror "Processor type and features --->" eerror " [ ] Symmetric multi-processing support" die "SMP support is enabled." else einfo "SMP support disabled, good." fi unpack ${P/_/}_plus_fixes_${FIX_V}.tar.bz2 || die "Unpacking acx100 failed." mkdir ${FW_S} && cd ${FW_S} || die "Creation of temporary directory for firmware failed." unpack dwl520+_drivers_${FW_V}.zip || die "Unpacking firmware failed." # NO IDEA, IF WE REALLY NEED THIS! cp ${FW_S}/Drivers/Win2000/WLANGEN.bin ${FW_S}/Drivers/Win2000/RADIO0d.BIN ${FW_S}/Drivers/Win2000/RADIO11.BIN ${S}/firmware && \ mv ${S}/firmware/WLANGEN.bin ${S}/firmware/WLANGEN.BIN || die "Firmware installation failed." kernel-mod_getversion } src_compile() { unset ARCH make KVER=${KV} KDIR=/usr/src/linux || die "make failed" } src_install() { if [ ${KV_MINOR} -gt 4 ] then KV_OBJ="ko" else KV_OBJ="o" fi make install || die "make install failed" dodoc README TODO ChangeLog insinto /usr/lib/hotplug/firmware/acx100 doins ${S}/firmware/*.BIN doins ${S}/LICENSE } pkg_postint() { depmod -a }