# $Id: PKGBUILD 205493 2014-02-06 05:23:57Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Jason Chu <jchu@xentac.net>

pkgname=wireless_tools
pkgver=30.pre9
_pkgver=${pkgver%.pre*}
pkgrel=1
pkgdesc='Tools allowing to manipulate the Wireless Extensions'
url='http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html'
license=('GPL')
arch=('i686' 'x86_64')
source=("http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/${pkgname}.${pkgver}.tar.gz")
sha1sums=('41db5ced9ed3d8d3cc104ce43c19af1d72f07eec')

prepare() {
	cd "${srcdir}/${pkgname}.${_pkgver}"
	sed '/BUILD_STATIC =/d' -i Makefile
}

build() {
	cd "${srcdir}/${pkgname}.${_pkgver}"
	make CFLAGS="${CFLAGS} -I." LDFLAGS="${LDFLAGS}"
}

package() {
	cd "${srcdir}/${pkgname}.${_pkgver}"
	make \
		INSTALL_DIR="${pkgdir}/usr/bin" \
		INSTALL_LIB="${pkgdir}/usr/lib" \
		INSTALL_INC="${pkgdir}/usr/include" \
		INSTALL_MAN="${pkgdir}/usr/share/man" \
		install
}
