summaryrefslogtreecommitdiffstats
path: root/main/wpa_supplicant
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-06-17 09:16:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-06-17 09:31:15 +0000
commit3698511c9263be69e0a7ea16b135d75438e63601 (patch)
tree68668e94eaac64bcbb97c8f3dda853cc2db87f25 /main/wpa_supplicant
parentcb8ff12c4ccb6c236d8da799a8c82c4413f572a7 (diff)
downloadaports-3698511c9263be69e0a7ea16b135d75438e63601.tar.bz2
aports-3698511c9263be69e0a7ea16b135d75438e63601.tar.xz
main/wpa_supplicant: upgrade to 0.7.2
Diffstat (limited to 'main/wpa_supplicant')
-rw-r--r--main/wpa_supplicant/APKBUILD14
-rw-r--r--main/wpa_supplicant/wpa_supplicant.confd6
-rw-r--r--main/wpa_supplicant/wpa_supplicant.initd70
3 files changed, 87 insertions, 3 deletions
diff --git a/main/wpa_supplicant/APKBUILD b/main/wpa_supplicant/APKBUILD
index 3474daa14..a79805c90 100644
--- a/main/wpa_supplicant/APKBUILD
+++ b/main/wpa_supplicant/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wpa_supplicant
-pkgver=0.7.1
-pkgrel=2
+pkgver=0.7.2
+pkgrel=0
pkgdesc="A utility providing key negotiation for WPA wireless networks"
url="http://hostap.epitest.fi/wpa_supplicant"
license="GPL"
@@ -9,6 +9,8 @@ subpackages="$pkgname-doc"
depends=
makedepends="openssl-dev dbus-dev libnl-dev"
source="http://hostap.epitest.fi/releases/$pkgname-$pkgver.tar.gz
+ wpa_supplicant.initd
+ wpa_supplicant.confd
"
_builddir="$srcdir"/$pkgname-$pkgver/$pkgname
@@ -112,5 +114,11 @@ package() {
install fi.epitest.hostap.WPASupplicant.service \
"$pkgdir"/usr/share/dbus-1/system-services || return 1
install -d "$pkgdir"/var/run/wpa_supplicant
+ install -Dm755 "$srcdir"/wpa_supplicant.initd \
+ "$pkgdir"/etc/init.d/wpa_supplicant || return 1
+ install -Dm755 "$srcdir"/wpa_supplicant.confd \
+ "$pkgdir"/etc/conf.d/wpa_supplicant || return 1
}
-md5sums="02c475f949e5c131856915bbb87fa55d wpa_supplicant-0.7.1.tar.gz"
+md5sums="0e2cb7e4c35667351d8b7ec28c783e6a wpa_supplicant-0.7.2.tar.gz
+6185ecb6aecef66310cdd23fb3fb7d0c wpa_supplicant.initd
+bc117427f2c538439f3f1481a028ee06 wpa_supplicant.confd"
diff --git a/main/wpa_supplicant/wpa_supplicant.confd b/main/wpa_supplicant/wpa_supplicant.confd
new file mode 100644
index 000000000..104b9dc5d
--- /dev/null
+++ b/main/wpa_supplicant/wpa_supplicant.confd
@@ -0,0 +1,6 @@
+# conf.d file for wpa_supplicant
+#
+# Please check man 8 wpa_supplicant for more information about the options
+# wpa_supplicant accepts.
+#
+wpa_supplicant_args=""
diff --git a/main/wpa_supplicant/wpa_supplicant.initd b/main/wpa_supplicant/wpa_supplicant.initd
new file mode 100644
index 000000000..8429a3733
--- /dev/null
+++ b/main/wpa_supplicant/wpa_supplicant.initd
@@ -0,0 +1,70 @@
+#!/sbin/runscript
+# Copyright (c) 2009 Roy Marples <roy@marples.name>
+# All rights reserved. Released under the 2-clause BSD license.
+
+command=/usr/sbin/wpa_supplicant
+: ${wpa_supplicant_conf:=/etc/wpa_supplicant/wpa_supplicant.conf}
+wpa_supplicant_if=${wpa_supplicant_if:+-i}$wpa_supplicant_if
+command_args="$wpa_supplicant_args -B -c$wpa_supplicant_conf $wpa_supplicant_if"
+name="WPA Supplicant Daemon"
+
+depend()
+{
+ need localmount
+ use logger
+ after bootmisc modules
+ before dns dhcpcd net
+ keyword -shutdown
+}
+
+find_wireless()
+{
+ local iface=
+
+ case "$RC_UNAME" in
+ Linux)
+ for iface in /sys/class/net/*; do
+ if [ -e "$iface"/wireless -o \
+ -e "$iface"/phy80211 ]
+ then
+ echo "${iface##*/}"
+ return 0
+ fi
+ done
+ ;;
+ *)
+ for iface in /dev/net/* $(ifconfig -l 2>/dev/null); do
+ if ifconfig "${iface##*/}" 2>/dev/null | \
+ grep -q "[ ]*ssid "
+ then
+ echo "${iface##*/}"
+ return 0
+ fi
+ done
+ ;;
+ esac
+
+ return 1
+}
+
+append_wireless()
+{
+ local iface= i=
+
+ iface=$(find_wireless)
+ if [ -n "$iface" ]; then
+ for i in $iface; do
+ command_args="$command_args -i$i"
+ done
+ else
+ eerror "Could not find a wireless interface"
+ fi
+}
+
+start_pre()
+{
+ case " $command_args" in
+ *" -i"*) ;;
+ *) append_wireless;;
+ esac
+}