# wireless_tools
# Builds from https://github.com/puppylinux-woof-CE/petbuilds
# File auto generated by ./mk_petbuild.sh. Edit as necessary.

. ../func
. ../build.conf

URL=http://www.labs.hpe.com/personal/Jean_Tourrilhes/Linux
#PKG=wireless_tools.30.pre9.tar.gz
#VER=wireless_tools.30.pre9
PKG=wireless_tools
SVER=30.pre9
VER=30.0
PVER=30
COMP=tar.gz
DESC="tools for linux wireless networks"
DEPS=
CAT=BuildingBlock
DESKTOP=
BUILD=
CWD=$(pwd)
[ -z "$MWD" ] && MWD=$(dirname $CWD)
[ -z "$BUILD" ] && BUILD=$DEF_BUILD
# comment these 2 below if you use a custom package() function
#[ -f "$DESKTOP" ] || DESKTOP=not
#[ -z "$DEPS" ] && DEPS=not

ARCH=$(uname -m)
case $ARCH in # set in build.conf
 *64) 	LIBDIR=$LIBCONF64 ;;
 arm*)	LIBDIR=$LIBCONFarm;;
 *) 	LIBDIR=$LIBCONF32 ;;
esac

fix() {
	mv ${PKG}.${PVER} ${PKG}-${VER}
}

build() {
	cd ${PKG}-${VER}
	make || exit
	make PREFIX=${CWD}/${PKG}-install/usr \
		IWLIB_INSTALL=install-dynamic \
		INSTALL_LIB=${CWD}/${PKG}-install/usr/${LIBDIR} \
		install || exit #ugh
	cd -	
}

# main
retrieve ${PKG}.${SVER}.${COMP}
extract ${PKG}.${SVER}.${COMP}
fix
build
package_std $PKG $VER $ARCH $DESKTOP "$DESC" $DEPS $CAT
