pkgname=wpa_supplicant pkgver=2.11 pkgrel=1 pkgdesc="A utility providing key negotiation for WPA wireless networks" arch=('x86_64') url="https://w1.fi/wpa_supplicant" license=('BSD-3-Clause') depends=('glibc' 'dbus' 'libnl' 'openssl' 'readline') source=(https://w1.fi/releases/${pkgname}-${pkgver}.tar.gz) sha256sums=(912ea06f74e30a8e36fbb68064d6cdff218d8d591db0fc5d75dee6c81ac7fc0a) prepare() { cd ${pkgname}-${pkgver} cat > wpa_supplicant/.config << "EOF" CONFIG_BACKEND=file CONFIG_CTRL_IFACE=y CONFIG_DEBUG_FILE=y CONFIG_DEBUG_SYSLOG=y CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON CONFIG_DRIVER_NL80211=y CONFIG_DRIVER_WEXT=y CONFIG_DRIVER_WIRED=y CONFIG_EAP_GTC=y CONFIG_EAP_LEAP=y CONFIG_EAP_MD5=y CONFIG_EAP_MSCHAPV2=y CONFIG_EAP_OTP=y CONFIG_EAP_PEAP=y CONFIG_EAP_TLS=y CONFIG_EAP_TTLS=y CONFIG_IEEE8021X_EAPOL=y CONFIG_IPV6=y CONFIG_LIBNL32=y CONFIG_PEERKEY=y CONFIG_PKCS12=y CONFIG_READLINE=y CONFIG_SMARTCARD=y CONFIG_WPS=y CFLAGS += -I/usr/include/libnl3 CONFIG_CTRL_IFACE_DBUS=y CONFIG_CTRL_IFACE_DBUS_NEW=y CONFIG_CTRL_IFACE_DBUS_INTRO=y EOF } build() { cd ${pkgname}-${pkgver}/wpa_supplicant make CC="${CHOST}-gcc" BINDIR=/usr/sbin LIBDIR=/usr/lib64 } package() { cd ${pkgname}-${pkgver}/wpa_supplicant install -vDm755 wpa_{cli,passphrase,supplicant} -t ${pkgdir}/usr/sbin/ install -vDm644 doc/docbook/wpa_supplicant.conf.5 -t ${pkgdir}/usr/share/man/man5/ install -vDm644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 -t ${pkgdir}/usr/share/man/man8/ install -vDm644 systemd/*.service -t ${pkgdir}/usr/lib/systemd/system/ install -vDm644 dbus/fi.w1.wpa_supplicant1.service -t ${pkgdir}/usr/share/dbus-1/system-services/ install -vDm644 dbus/dbus-wpa_supplicant.conf -t ${pkgdir}/etc/dbus-1/system.d/wpa_supplicant.conf install -vdm755 ${pkgdir}/etc/wpa_supplicant }