wok-next view wpa_supplicant/receipt @ rev 21017

Some maintenance
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Oct 16 16:46:05 2018 +0300 (2018-10-16)
parents df20b2110f7e
children d5aab818505e
line source
1 # SliTaz package receipt v2.
3 PACKAGE="wpa_supplicant"
4 VERSION="2.6"
5 CATEGORY="utilities"
6 SHORT_DESC="WPA Supplicant with support for WPA and WPA2"
7 MAINTAINER="0dddba11@googlemail.com"
8 LICENSE="GPL2"
9 WEB_SITE="http://w1.fi/wpa_supplicant/"
10 LFS="http://www.linuxfromscratch.org/blfs/view/svn/basicnet/wpa_supplicant.html"
11 REPOLOGY="wpa-supplicant"
13 TARBALL="$PACKAGE-$VERSION.tar.gz"
14 WGET_URL="http://w1.fi/releases/$TARBALL"
16 BUILD_DEPENDS_arm="openssl-dev libnl-dev"
17 BUILD_DEPENDS="libnl-dev dbus-dev openssl-dev readline-dev"
19 compile_rules() {
20 cd $src/wpa_supplicant
21 cp -a defconfig .config
23 # Main build configs
24 cat >> .config <<EOT
25 CONFIG_DEBUG_FILE=y
26 CONFIG_DEBUG_SYSLOG=y
27 CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
28 CONFIG_IPV6=y
29 CONFIG_LIBNL32=y
30 CONFIG_READLINE=y
31 CONFIG_WPS=y
32 CONFIG_AP=y
33 CONFIG_BGSCAN_SIMPLE=y
34 EOT
35 # Don't use DBUS on ARM arch
36 case "$ARCH" in
37 arm)
38 cat >> .config <<EOT
39 CFLAGS += -I${sysroot}/usr/include/libnl3
40 CFLAGS += -I${sysroot}/usr/include/openssl
41 LIBS += -L${sysroot}/usr/lib
42 EOT
43 ;;
44 i?86|x86_64)
45 cat >> .config <<EOT
46 CFLAGS += -I/usr/include/libnl3
47 CONFIG_CTRL_IFACE_DBUS=y
48 CONFIG_CTRL_IFACE_DBUS_NEW=y
49 CONFIG_CTRL_IFACE_DBUS_INTRO=y
50 EOT
51 ;;
52 esac
53 make BINDIR=/sbin LIBDIR=/lib || exit 1
55 # commands
56 bindir="$install/sbin"
57 mkdir -p $bindir
58 install -vm755 wpa_cli $bindir
59 install -vm755 wpa_passphrase $bindir
60 install -vm755 wpa_supplicant $bindir
62 cook_pick_manpages \
63 doc/docbook/wpa_supplicant.conf.5 \
64 doc/docbook/wpa_cli.8 \
65 doc/docbook/wpa_passphrase.8 \
66 doc/docbook/wpa_supplicant.8
68 mkdir -p $install/usr/share/dbus-1/system-services
69 install -vm644 dbus/*.service $install/usr/share/dbus-1/system-services/
71 mkdir -p $install/etc/dbus-1/system.d
72 install -vm644 dbus/dbus-wpa_supplicant.conf \
73 $install/etc/dbus-1/system.d/wpa_supplicant.conf
75 # Startup script and cleaned up wpa_empty.conf
76 cp -a $stuff/etc $install
77 install -vm644 $src/wpa_supplicant/wpa_supplicant.conf $install/etc/wpa
78 chown -R root:root $install/etc
79 }
81 genpkg_rules() {
82 copy @std
83 DEPENDS="dbus openssl libnl ncurses readline"
84 CONFIG_FILES="/etc/wpa/wpa_supplicant.conf"
85 TAGS="wireless wifi network"
86 case "$SLITAZ_ARCH" in
87 arm*) DEPENDS="openssl libnl";;
88 esac
89 }
91 post_install() {
92 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" <<"EOT"
94 # wpa_supplicant daemon options
95 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i $(. /etc/network.conf; echo $WIFI_INTERFACE)"
97 EOT
98 # We use /etc/wpa/wpa.conf from SliTaz 5.0
99 sed -i 's|/etc/wpa_supplicant.conf|/etc/wpa/wpa.conf|' "$1/etc/daemons.conf" 2>/dev/null
100 # 'w' option don't exist anymore with < 0.6.9
101 sed -i 's|-Bw|-B|' "$1/etc/daemons.conf" 2>/dev/null
102 sed -i 's|-B -w|-B|g' "$1/etc/init.d/network.sh" 2>/dev/null
103 }