wok-6.x view wpa_supplicant/receipt @ rev 20901

updated expect (5.45 -> 5.45.4)
author Hans-G?nter Theisgen
date Tue Feb 26 17:33:50 2019 +0100 (2019-02-26)
parents e25ff83b65ed
children def8459358ed
line source
1 # SliTaz package receipt.
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 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://hostap.epitest.fi/wpa_supplicant/"
11 WGET_URL="http://hostap.epitest.fi/releases/$TARBALL"
12 CONFIG_FILES="/etc/wpa/wpa_supplicant.conf"
13 TAGS="wireless wifi network"
14 HOST_ARCH="i486 arm"
16 DEPENDS="libssl libcrypto libnl dbus pcsc-lite"
17 BUILD_DEPENDS="openssl-dev libcrypto-dev libnl-dev dbus-dev pcsc-lite-dev"
19 # Arch install
20 case "$SLITAZ_ARCH" in
21 arm*) DEPENDS="libssl libcrypto libnl" ;;
22 esac
24 # Cross compile
25 case "$ARCH" in
26 arm*) BUILD_DEPENDS="openssl-dev libcrypto-dev libnl-dev" ;;
27 esac
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 for i in $stuff/*.patch
33 do
34 if [ -f done.$(basename $i) ]; then
35 continue
36 else
37 patch -p1 < $i && touch done.$(basename $i) || return 1
38 fi
39 done
40 cd $src/$PACKAGE
41 cp -a ./defconfig ./.config
42 sed 's/-lnl/-lnl-3/g' -i ../src/drivers/drivers.mak
43 sed 's/-lnl-3-genl/-lnl-genl-3/g' -i ../src/drivers/drivers.mak
44 # Main build configs
45 cat >> .config << EOT
46 CONFIG_AP=y
47 CONFIG_BGSCAN_SIMPLE=y
48 CONFIG_LIBNL20=y
49 EOT
50 # Dont use DBUS on ARM arch
51 case "$ARCH" in
52 i?86)
53 cat >> .config << EOT
54 CFLAGS += -I/usr/include/libnl3
55 CONFIG_CTRL_IFACE_DBUS=y
56 CONFIG_CTRL_IFACE_DBUS_NEW=y
57 CONFIG_CTRL_IFACE_DBUS_INTRO=y
58 CONFIG_EAP_SIM=y
59 CONFIG_PCSC=y
60 EOT
61 ;;
62 arm)
63 cat >> .config << EOT
64 CFLAGS += -I${sysroot}/usr/include/libnl3
65 CFLAGS += -I${sysroot}/usr/include/openssl
66 LIBS += -L${sysroot}/usr/lib
67 EOT
68 ;;
69 esac
70 make BINDIR=/usr/bin LIBDIR=/lib
71 }
73 # Rules to gen a SliTaz package suitable for Tazpkg.
74 genpkg_rules()
75 {
76 # commands
77 mkdir -p $fs/usr/bin
78 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
79 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
80 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
82 # D-Bus control
83 mkdir -p $fs/usr/share/dbus-1/system-services
84 install -v -m644 \
85 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \
86 $fs/usr/share/dbus-1/system-services
87 install -v -m644 \
88 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
89 $fs/usr/share/dbus-1/system-services
91 mkdir -p $fs/etc/dbus-1/system.d
92 install -v -m644 \
93 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
94 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
96 # Startup script and cleaned up wpa_empty.conf
97 cp -a $stuff/etc $fs
98 install -m644 -oroot -groot $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
99 }
101 # Pre and post install commands for Tazpkg.
102 post_install()
103 {
104 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" << EOT
106 # wpa_supplicant daemon options
107 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
109 EOT
110 # We use /etc/wpa/wpa.conf from SliTaz 5.0
111 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ "$1/etc/daemons.conf" 2> /dev/null
112 # 'w' option dont exist anymore with < 0.6.9
113 sed -i s/'-Bw'/'-B'/ "$1/etc/daemons.conf" 2> /dev/null
114 sed -i s/'-B -w'/'-B'/g "$1/etc/init.d/network.sh" 2> /dev/null
115 }