void-packages/srcpkgs/wpa_supplicant/template

53 lines
1.7 KiB
Text

# Template file for 'wpa_supplicant'
pkgname=wpa_supplicant
version=2.0
revision=2
build_wrksrc=$pkgname
short_desc="WPA/WPA2/IEEE 802.1X Supplicant"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://hostap.epitest.fi"
distfiles="$homepage/releases/$pkgname-$version.tar.gz"
checksum=2c115609fbb5223d51381084a5c944455a8afcda81d584173ff55ba233379e09
hostmakedepends="pkg-config"
makedepends="libnl3-devel openssl-devel dbus-devel readline-devel"
conf_files="/etc/wpa_supplicant.conf"
do_build() {
sed -i 's|/usr/local|$(PREFIX)|g' Makefile
cp -f ${FILESDIR}/config .config
if [ "$CROSS_BUILD" ]; then
export CFLAGS="-I$XBPS_CROSS_BASE/usr/include/libnl3 $CFLAGS"
fi
make ${make_build_args} V=1 PREFIX=/usr
}
do_install() {
make PREFIX=/usr DESTDIR=${DESTDIR} install
vinstall ${FILESDIR}/${pkgname}.tmpfiles.d \
644 usr/lib/tmpfiles.d ${pkgname}.conf
vinstall ${FILESDIR}/${pkgname}.conf 644 etc/$pkgname
vinstall wpa_supplicant.conf 644 usr/share/examples/${pkgname}
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
vmkdir usr/lib/systemd/system
install -m644 systemd/*.service ${DESTDIR}/usr/lib/systemd/system
# Fix wpa_supplicant@.service to respect instance name.
sed -e 's,wpa_supplicant@wlan0.service,wpa_supplicant@%i.service,' -i \
${DESTDIR}/usr/lib/systemd/system/wpa_supplicant@.service
}