classabbyamp 499624b4cd Revert "wpa_supplicant: use capabilities in service"
This reverts commit b43eee69fdadff822b9c0988d4867395426139bc.

Many users have reported an inability to control wpa_supplicant with
this change, including not being able to use wpa_cli as root or not and
not having working internet on fresh installs.
2025-02-24 00:19:15 -05:00

60 lines
1.7 KiB
Bash

# Template file for 'wpa_supplicant'
pkgname=wpa_supplicant
version=2.11
revision=3
build_wrksrc="${pkgname}"
build_style=gnu-makefile
make_build_args="V=1 BINDIR=/usr/bin"
make_install_args="BINDIR=/usr/bin"
make_use_env=true
hostmakedepends="pkg-config"
makedepends="libnl3-devel openssl-devel $(vopt_if dbus dbus-devel)
$(vopt_if readline readline-devel)"
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=912ea06f74e30a8e36fbb68064d6cdff218d8d591db0fc5d75dee6c81ac7fc0a
make_check=no # has no test suite
build_options="dbus readline"
build_options_default="dbus readline"
conf_files="/etc/${pkgname}/${pkgname}.conf"
pre_build() {
cp -f ${FILESDIR}/config .config
if [ "$build_option_dbus" ]; then
vsed -i -e 's, -u, -uq,' dbus/*.service.in
else
vsed -i -e 's|#\{0,1\}\(CONFIG_CTRL_IFACE_DBUS_NEW\)=\(.*\)|\1=|' .config
vsed -i -e 's|#\{0,1\}\(CONFIG_CTRL_IFACE_DBUS_INTRO\)=\(.*\)|\1=|' .config
fi
if [ "$build_option_readline" ]; then
vsed -i -e 's|#\{0,1\}\(CONFIG_READLINE\)=\(.*\)|\1=y|' .config
fi
}
post_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
}