wpa_supplicant: make wpa_supplicant@ also work for wext, fix conf_files.

This commit is contained in:
Juan RP 2014-03-24 17:29:47 +01:00
parent 7fc4d41983
commit 7085a69a57

View file

@ -1,7 +1,7 @@
# Template file for 'wpa_supplicant'
pkgname=wpa_supplicant
version=2.1
revision=3
revision=4
build_wrksrc=$pkgname
short_desc="WPA/WPA2/IEEE 802.1X Supplicant"
maintainer="Juan RP <xtraeme@gmail.com>"
@ -12,7 +12,7 @@ checksum=91632e7e3b49a340ce408e2f978a93546a697383abf2e5a60f146faae9e1b277
hostmakedepends="pkg-config"
makedepends="libnl3-devel openssl-devel dbus-devel readline-devel>=6.3"
conf_files="/etc/wpa_supplicant.conf"
conf_files="/etc/${pkgname}/${pkgname}.conf"
pre_build() {
sed -i 's|/usr/local|$(PREFIX)|g' Makefile
@ -21,11 +21,11 @@ pre_build() {
do_build() {
export CFLAGS+=" $(pkg-config --cflags libnl-3.0)"
make ${make_build_args} V=1 PREFIX=/usr
make ${make_build_args} V=1 PREFIX=/usr BINDIR=/usr/bin
}
do_install() {
make PREFIX=/usr DESTDIR=${DESTDIR} install
make PREFIX=/usr BINDIR=/usr/bin DESTDIR=${DESTDIR} install
vinstall ${FILESDIR}/${pkgname}.tmpfiles.d \
644 usr/lib/tmpfiles.d ${pkgname}.conf
@ -49,9 +49,6 @@ do_install() {
# 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
vmkdir usr/bin
mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
sed -e 's,/usr/sbin/,/usr/bin,g' -i \
${DESTDIR}/usr/lib/systemd/system/*.service
# Make wpa_supplicant@.service also work for wext (nl80211 is the default).
sed -e 's,-i%I,& -Dnl80211,wext' -i ${DESTDIR}/usr/lib/systemd/system/wpa_supplicant@.service
}