void-packages/srcpkgs/wpa_supplicant/template

48 lines
1.5 KiB
Bash

# Template file for 'wpa_supplicant'
pkgname=wpa_supplicant
version=2.4
revision=6
patch_args="-Np1"
build_wrksrc=$pkgname
short_desc="WPA/WPA2/IEEE 802.1X Supplicant"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="BSD"
homepage="http://w1.fi/wpa_supplicant/"
distfiles="http://w1.fi/releases/$pkgname-$version.tar.gz"
checksum=058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122
build_pie=yes
hostmakedepends="pkg-config"
makedepends="libnl3-devel libressl-devel dbus-devel readline-devel"
conf_files="/etc/sv/wpa_supplicant/conf /etc/sv/wpa_supplicant/log/run /etc/${pkgname}/${pkgname}.conf"
pre_build() {
sed -i 's|/usr/local|$(PREFIX)|g' Makefile
cp -f ${FILESDIR}/config .config
sed -i 's, -u, -uq,' dbus/*.service.in
}
do_build() {
export CFLAGS+=" $(pkg-config --cflags libnl-3.0) $CPPFLAGS"
make ${makejobs} V=1 PREFIX=/usr BINDIR=/usr/bin
}
do_install() {
make PREFIX=/usr BINDIR=/usr/bin DESTDIR=${DESTDIR} install
vinstall ${FILESDIR}/${pkgname}.conf 644 etc/$pkgname
vsconf wpa_supplicant.conf
for d in 5 8; do
install -d ${DESTDIR}/usr/share/man/man${d}
done
install -m644 doc/docbook/*.5 ${DESTDIR}/usr/share/man/man5
install -m644 doc/docbook/*.8 ${DESTDIR}/usr/share/man/man8
install -d ${DESTDIR}/usr/share/dbus-1/system-services
install -m644 dbus/*.service ${DESTDIR}/usr/share/dbus-1/system-services/
vinstall dbus/dbus-${pkgname}.conf 644 etc/dbus-1/system.d ${pkgname}.conf
rm ${DESTDIR}/usr/share/man/man8/wpa_gui.8
vlicense README
vsv wpa_supplicant
}