wok-next view wpa_supplicant/receipt @ rev 20443

The rest of my "home work" for update many packages (up to Xorg, GTK and Openbox) for Next and mainly for Next64. Since this point this repository is open for commits. Many errors are expected due to harfbuzz-freetype dependency loop...
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Feb 24 16:17:33 2018 +0200 (2018-02-24)
parents 0ed344a8daed
children e6615350078d
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/stable/basicnet/wpa_supplicant.html"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="http://w1.fi/releases/$TARBALL"
15 BUILD_DEPENDS_arm="openssl-dev libcrypto-dev libnl-dev"
16 BUILD_DEPENDS="libnl-dev dbus-dev openssl-dev readline-dev"
18 compile_rules() {
19 cd $src/wpa_supplicant
20 cp -a defconfig .config
22 # Main build configs
23 cat >> .config <<EOT
24 CONFIG_DEBUG_FILE=y
25 CONFIG_DEBUG_SYSLOG=y
26 CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
27 CONFIG_IPV6=y
28 CONFIG_LIBNL32=y
29 CONFIG_READLINE=y
30 CONFIG_WPS=y
31 CONFIG_AP=y
32 CONFIG_BGSCAN_SIMPLE=y
33 EOT
34 # Don't use DBUS on ARM arch
35 case "$ARCH" in
36 arm)
37 cat >> .config <<EOT
38 CFLAGS += -I${sysroot}/usr/include/libnl3
39 CFLAGS += -I${sysroot}/usr/include/openssl
40 LIBS += -L${sysroot}/usr/lib
41 EOT
42 ;;
43 i?86|x86_64)
44 cat >> .config <<EOT
45 CFLAGS += -I/usr/include/libnl3
46 CONFIG_CTRL_IFACE_DBUS=y
47 CONFIG_CTRL_IFACE_DBUS_NEW=y
48 CONFIG_CTRL_IFACE_DBUS_INTRO=y
49 EOT
50 ;;
51 esac
52 make BINDIR=/sbin LIBDIR=/lib || exit 1
54 # commands
55 bindir="$install/sbin"
56 mkdir -p $bindir
57 install -vm755 wpa_cli $bindir
58 install -vm755 wpa_passphrase $bindir
59 install -vm755 wpa_supplicant $bindir
61 cook_pick_manpages \
62 doc/docbook/wpa_supplicant.conf.5 \
63 doc/docbook/wpa_cli.8 \
64 doc/docbook/wpa_passphrase.8 \
65 doc/docbook/wpa_supplicant.8
67 mkdir -p $install/usr/share/dbus-1/system-services
68 install -vm644 dbus/*.service $install/usr/share/dbus-1/system-services/
70 mkdir -p $install/etc/dbus-1/system.d
71 install -vm644 dbus/dbus-wpa_supplicant.conf \
72 $install/etc/dbus-1/system.d/wpa_supplicant.conf
74 # Startup script and cleaned up wpa_empty.conf
75 cp -a $stuff/etc $install
76 install -vm644 $src/wpa_supplicant/wpa_supplicant.conf $install/etc/wpa
77 chown -R root:root $install/etc
78 }
80 genpkg_rules() {
81 copy @std
82 DEPENDS="dbus libcrypto libnl libssl ncurses readline"
83 CONFIG_FILES="/etc/wpa/wpa_supplicant.conf"
84 TAGS="wireless wifi network"
85 case "$SLITAZ_ARCH" in
86 arm*) DEPENDS="libssl libcrypto libnl";;
87 esac
88 }
90 post_install() {
91 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" <<"EOT"
93 # wpa_supplicant daemon options
94 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i $(. /etc/network.conf; echo $WIFI_INTERFACE)"
96 EOT
97 # We use /etc/wpa/wpa.conf from SliTaz 5.0
98 sed -i 's|/etc/wpa_supplicant.conf|/etc/wpa/wpa.conf|' "$1/etc/daemons.conf" 2>/dev/null
99 # 'w' option don't exist anymore with < 0.6.9
100 sed -i 's|-Bw|-B|' "$1/etc/daemons.conf" 2>/dev/null
101 sed -i 's|-B -w|-B|g' "$1/etc/init.d/network.sh" 2>/dev/null
102 }