wok-next view wpa_supplicant/receipt @ rev 20352
etherboot: use gcc49
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Nov 19 13:55:44 2017 +0100 (2017-11-19) |
parents | 9e01bc6321ea |
children | 0e7893ac206d |
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 HOST_ARCH="i486 arm"
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 # Rules to configure and make the package.
19 compile_rules() {
20 # http://www.linuxfromscratch.org/blfs/view/stable/basicnet/wpa_supplicant.html
22 cd $src/wpa_supplicant
23 cp -a defconfig .config
25 # Main build configs
26 cat >> .config <<EOT
27 CONFIG_DEBUG_FILE=y
28 CONFIG_DEBUG_SYSLOG=y
29 CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
30 CONFIG_IPV6=y
31 CONFIG_LIBNL32=y
32 CONFIG_READLINE=y
33 CONFIG_WPS=y
34 CONFIG_AP=y
35 CONFIG_BGSCAN_SIMPLE=y
36 EOT
37 # Don't use DBUS on ARM arch
38 case "$ARCH" in
39 i?86)
40 cat >> .config <<EOT
41 CFLAGS += -I/usr/include/libnl3
42 CONFIG_CTRL_IFACE_DBUS=y
43 CONFIG_CTRL_IFACE_DBUS_NEW=y
44 CONFIG_CTRL_IFACE_DBUS_INTRO=y
45 EOT
46 ;;
47 arm)
48 cat >> .config <<EOT
49 CFLAGS += -I${sysroot}/usr/include/libnl3
50 CFLAGS += -I${sysroot}/usr/include/openssl
51 LIBS += -L${sysroot}/usr/lib
52 EOT
53 ;;
54 esac
55 make BINDIR=/sbin LIBDIR=/lib || exit 1
57 # commands
58 bindir="$install/sbin"
59 mkdir -p $bindir
60 install -vm755 wpa_cli $bindir
61 install -vm755 wpa_passphrase $bindir
62 install -vm755 wpa_supplicant $bindir
64 cook_pick_manpages \
65 doc/docbook/wpa_supplicant.conf.5 \
66 doc/docbook/wpa_cli.8 \
67 doc/docbook/wpa_passphrase.8 \
68 doc/docbook/wpa_supplicant.8
70 mkdir -p $install/usr/share/dbus-1/system-services
71 install -vm644 dbus/*.service $install/usr/share/dbus-1/system-services/
73 mkdir -p $install/etc/dbus-1/system.d
74 install -vm644 dbus/dbus-wpa_supplicant.conf \
75 $install/etc/dbus-1/system.d/wpa_supplicant.conf
77 # Startup script and cleaned up wpa_empty.conf
78 cp -a $stuff/etc $install
79 install -vm644 $src/wpa_supplicant/wpa_supplicant.conf $install/etc/wpa
80 chown -R root:root $install/etc
81 }
83 # Rules to gen a SliTaz package suitable for Tazpkg.
84 genpkg_rules() {
85 copy @std
86 DEPENDS="dbus libcrypto libnl libssl ncurses readline"
87 CONFIG_FILES="/etc/wpa/wpa_supplicant.conf"
88 TAGS="wireless wifi network"
89 case "$SLITAZ_ARCH" in
90 arm*) DEPENDS="libssl libcrypto libnl";;
91 esac
92 }
94 # Pre and post install commands for Tazpkg.
95 post_install() {
96 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" <<"EOT"
98 # wpa_supplicant daemon options
99 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i $(. /etc/network.conf; echo $WIFI_INTERFACE)"
101 EOT
102 # We use /etc/wpa/wpa.conf from SliTaz 5.0
103 sed -i 's|/etc/wpa_supplicant.conf|/etc/wpa/wpa.conf|' "$1/etc/daemons.conf" 2>/dev/null
104 # 'w' option don't exist anymore with < 0.6.9
105 sed -i 's|-Bw|-B|' "$1/etc/daemons.conf" 2>/dev/null
106 sed -i 's|-B -w|-B|g' "$1/etc/init.d/network.sh" 2>/dev/null
107 }