void-packages/srcpkgs/wpa_supplicant/template
Peter Bui 60d483a22c wpa_supplicant: update to 2.8.
Drop unnecessary rebased and libressl patches
2019-05-23 14:55:03 +02:00

61 lines
1.9 KiB
Bash

# Template file for 'wpa_supplicant'
pkgname=wpa_supplicant
version=2.8
revision=1
build_wrksrc="$pkgname"
short_desc="WPA/WPA2/IEEE 802.1X Supplicant"
maintainer="Juan RP <xtraeme@voidlinux.org>"
license="BSD-3-Clause"
homepage="http://w1.fi/wpa_supplicant/"
distfiles="http://w1.fi/releases/${pkgname}-${version}.tar.gz"
checksum=a689336a12a99151b9de5e25bfccadb88438f4f4438eb8db331cd94346fd3d96
hostmakedepends="pkg-config"
makedepends="libnl3-devel libressl-devel $(vopt_if dbus dbus-devel) $(vopt_if readline readline-devel)"
build_options="dbus readline"
build_options_default="dbus readline"
conf_files="/etc/${pkgname}/${pkgname}.conf"
pre_build() {
vsed -e 's|/usr/local|$(PREFIX)|g' -i Makefile
cp -f ${FILESDIR}/config .config
if [ "$build_option_dbus" ]; then
sed -i 's, -u, -uq,' dbus/*.service.in
else
sed -i 's|#\{0,1\}\(CONFIG_CTRL_IFACE_DBUS\)=\(.*\)|\1=|' .config
sed -i 's|#\{0,1\}\(CONFIG_CTRL_IFACE_DBUS_NEW\)=\(.*\)|\1=|' .config
sed -i 's|#\{0,1\}\(CONFIG_CTRL_IFACE_DBUS_INTRO\)=\(.*\)|\1=|' .config
fi
if [ "$build_option_readline" ]; then
sed -i 's|#\{0,1\}\(CONFIG_READLINE\)=\(.*\)|\1=y|' .config
fi
}
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
if [ "$build_option_dbus" ]; then
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
fi
vinstall ${FILESDIR}/${pkgname}.conf 640 etc/$pkgname
vsconf wpa_supplicant.conf
for d in doc/docbook/*.[58]; do
vman $d
done
rm ${DESTDIR}/usr/share/man/man8/wpa_gui.8
rm ${DESTDIR}/usr/share/man/man8/wpa_priv.8
rm ${DESTDIR}/usr/share/man/man8/eapol_test.8
vlicense README
vsv wpa_supplicant
}