62 lines
1.9 KiB
Bash
62 lines
1.9 KiB
Bash
# Template file for 'wpa_supplicant'
|
|
pkgname=wpa_supplicant
|
|
version=2.9
|
|
revision=5
|
|
build_wrksrc="$pkgname"
|
|
short_desc="WPA/WPA2/IEEE 802.1X Supplicant"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="BSD-3-Clause"
|
|
homepage="http://w1.fi/wpa_supplicant/"
|
|
distfiles="http://w1.fi/releases/${pkgname}-${version}.tar.gz"
|
|
checksum=fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17
|
|
patch_args="-Np1"
|
|
|
|
hostmakedepends="pkg-config"
|
|
makedepends="libnl3-devel openssl-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
|
|
}
|