# $Header: /magellan-cvs/smage/linux-wlan-ng/linux-wlan-ng-0.2.2-r1.smage2,v 1.3 2008/02/07 14:23:45 niro Exp $ PNAME="linux-wlan-ng" PVER="0.2.2" PBUILD="r1" PCATEGORIE="net-wlan" STATE="testing" DESCRIPTION="linux-wlan-ng is a complete, standards based, wireless LAN system for GNU/Linux." HOMEPAGE="http://linux-wlan.org/" DEPEND=">= dev-libs/openssl-0.9.7" SDEPEND=">= virtual/kernel-headers >= virtual/kernel-sources >= sys-apps/sed-4" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" SRC_URI=( mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/wlan.rc ) # compile time: unkown (Athlon XP 1900+, 512mb DDR400) src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # setup proper default locations sed -i -e "s:/usr/local/man/:/usr/share/man/:" man/Makefile || die sed -i -e "s:/etc/wlan:/etc/conf.d:g" etc/wlan/Makefile || die sed -i -e "s:/sbin/nwepgen:/sbin/keygen:" etc/wlan/wlancfg-DEFAULT || die sed -i -e "s:/etc/wlan/wlan.conf:/etc/conf.d/wlan.conf:g" \ -e "s:/etc/wlan/wlancfg:/etc/conf.d/wlancfg:g" \ etc/wlan/shared || die # fix SUBDIRS to M (kernel spec) sed -i 's:SUBDIRS=:M=:g' Makefile || die } src_compile() { cd ${SRCDIR} # setup linux-wlan-ng: # fix DESTDIR sed -i -e 's:TARGET_ROOT_ON_HOST=:TARGET_ROOT_ON_HOST=${BINDIR}:' config.in || die # build pci drivers sed -i -e 's:PRISM2_PCI=n:PRISM2_PCI=y:' config.in || die # do not build pcmcia drivers sed -i -e 's:PRISM2_PCMCIA=y:PRISM2_PCMCIA=n:' config.in || die # build usb dribers sed -i -e 's:PRISM2_USB=n:PRISM2_USB=y:' config.in || die # enable the configuration cp config.in default.config || die # 2.6 needs ARCH unset since it uses it local ARCH # build the config Makefile mmake default_config || die # compile it mmake all || die # compile add-on keygen program cd ${SRCDIR}/add-ons/keygen mmake || die cd ${SRCDIR}/add-ons/lwepgen mmake || die } src_install() { cd ${SRCDIR} # needed directories install -d ${BINDIR}/etc/wlan || die install -d ${BINDIR}/etc/rc.d/init.d || die # no DESTDIR ! we seded it into ;) make install || die # fix some locations mv ${BINDIR}/etc/conf.d/shared ${BINDIR}/etc/wlan/ || die # our initscript install -m 0755 -o root -g root \ ${SOURCEDIR}/${PNAME}/wlan.rc \ ${BINDIR}/etc/rc.d/init.d/wlan || die }