# Maintainer: Natanael Copa pkgname=hostapd pkgver=2.4 pkgrel=0 pkgdesc="daemon for wireless software access points" url="http://hostap.epitest.fi/hostapd/" arch="all" license="custom" depends= makedepends="openssl-dev libnl3-dev linux-headers" install= subpackages="$pkgname-doc" patches="CVE-2012-4445.patch musl-fix-types.patch" source="http://hostap.epitest.fi/releases/$pkgname-$pkgver.tar.gz $patches $pkgname.initd $pkgname.confd" _builddir="$srcdir"/$pkgname-$pkgver/hostapd prepare() { local conf="$_builddir/.config" cd "$_builddir"/.. for i in $patches; do msg $i patch -p1 -i "$srcdir"/$i || return 1 done cd "$_builddir" sed -i -e "s:/etc/hostapd:/etc/hostapd/hostapd:g" \ hostapd.conf # toolchain setup sed \ -e '/^#CONFIG_DRIVER_NL80211=y/s/^#//' \ -e '/^#CONFIG_RADIUS_SERVER=y/s/^#//' \ -e '/^#CONFIG_DRIVER_WIRED=y/s/^#//' \ -e '/^#CONFIG_DRIVER_NONE=y/s/^#//' \ -e '/^#CONFIG_IEEE80211N=y/s/^#//' \ -e '/^#CONFIG_IEEE80211R=y/s/^#//' \ -e '/^#CONFIG_IEEE80211AC=y/s/^#//' \ -e '/^#CONFIG_FULL_DYNAMIC_VLAN=y/s/^#//' \ -e '/^#CONFIG_LIBNL32=y/s/^#//' \ defconfig >> .config echo "CC ?= ${CC:-gcc}" >> .config echo "CFLAGS += -I/usr/include/libnl3" >> .config echo "LIBS += -L/usr/lib" >> .config } build() { cd "$_builddir" make || return 1 msg "nt_password_hash" make nt_password_hash || return 1 } package() { cd "$_builddir" install -d "$pkgdir"/etc/hostapd install hostapd.conf hostapd.accept hostapd.deny hostapd.eap_user \ hostapd.radius_clients hostapd.sim_db hostapd.wpa_psk \ "$pkgdir"/etc/hostapd/ || return 1 install -Dm755 hostapd "$pkgdir"/usr/sbin/hostapd \ && install -Dm755 hostapd_cli "$pkgdir"/usr/bin/hostapd_cli \ && install -Dm755 nt_password_hash \ "$pkgdir"/usr/bin/nt_password_hash \ && install -Dm755 "$srcdir"/hostapd.initd \ "$pkgdir"/etc/init.d/hostapd \ && install -Dm644 "$srcdir"/hostapd.confd \ "$pkgdir"/etc/conf.d/hostapd \ && install -Dm644 hostapd.8 \ "$pkgdir"/usr/share/man/man8/hostapd.8 \ && install -Dm644 hostapd_cli.1 \ "$pkgdir"/usr/share/man/man1/hostapd_cli \ || return 1 } md5sums="04578f3f2c3eb1bec1adf30473813912 hostapd-2.4.tar.gz 0d01d4641e0c33f79c1f4372613655bf CVE-2012-4445.patch 7568486221987c93041b4877eced7317 musl-fix-types.patch de734b22c3ad1e85309b5634d29c6225 hostapd.initd c91382209042defa04e79d0ae841a29e hostapd.confd" sha256sums="6fe0eb6bd1c9cbd24952ece8586b6f7bd14ab358edfda99794e79b9b9dbd657f hostapd-2.4.tar.gz 06dc7df2159fb0604191f66d35164caa5927963eebe77b5f2c389bd7590e2a49 CVE-2012-4445.patch f296013d432740478f24de7214d07ff897e6e38cbfd01a73a3158014f94fd771 musl-fix-types.patch 4bb2e7bfe8149353bb17ae74c3e6cf3c833af0b00303f7eb1eb4efe9867458e6 hostapd.initd 6c14e88b14bb9a93d2dca69239d829f435e93180e621319aeed0f3987290dfba hostapd.confd" sha512sums="37e648fe9cce92923ab1d1e23a4267e274c988785d7be5610f1affca425ffa86b438de81e37446926a0f9158d6b67ee83e6396c3f81d571545c973dddbf1ffe3 hostapd-2.4.tar.gz 619acce84516dead1e03e5da71657ea4c4b6f3ca8271574409773aeb316cbddc88095b50320804f457f001f4f3fe83053e660c008d8409f59bb4d3bfe058b601 CVE-2012-4445.patch 6ccdca29bc3a6b87d6e3f581c4f4725f0684bb88f39d46f875e9bdb0c41ee5b8be3b7908084c6631bffddece82cb2f2222e159d842944b6f2b7b639ef2de609c musl-fix-types.patch d840249b8f537875948e192665b980884bfc977681e577b27e3c5ae4c9724b0c2123cfee72eebbd0d5a33bf0979d7837fc48f8053e66dd06854cca1e8689b798 hostapd.initd 0882263bbd7c0b05bf51f51d66e11a23a0b8ca7da2a3b8a30166d2c5f044c0c134e6bccb1d02c9e81819ca8fb0c0fb55c7121a08fe7233ccaa73ff8ab9a238fe hostapd.confd"