wok view wpa_supplicant/receipt @ rev 21873

Up wpa_supplicant (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 27 15:06:17 2019 +0200 (2019-09-27)
parents def8459358ed
children bc4b94310a29
line source
1 # SliTaz package receipt.
3 PACKAGE="wpa_supplicant"
4 VERSION="2.9"
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="https://w1.fi/wpa_supplicant"
11 WGET_URL="${WEB_SITE%/*}/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 cd $src/$PACKAGE
33 cp -a ./defconfig ./.config
34 # Main build configs
35 cat >> .config << EOT
36 CONFIG_AP=y
37 CONFIG_BGSCAN_SIMPLE=y
38 CONFIG_LIBNL20=y
39 EOT
40 # Dont use DBUS on ARM arch
41 case "$ARCH" in
42 i?86)
43 cat >> .config << EOT
44 CFLAGS += -I/usr/include/libnl3
45 CONFIG_CTRL_IFACE_DBUS=y
46 CONFIG_CTRL_IFACE_DBUS_NEW=y
47 CONFIG_CTRL_IFACE_DBUS_INTRO=y
48 CONFIG_EAP_SIM=y
49 CONFIG_PCSC=y
50 EOT
51 ;;
52 arm)
53 cat >> .config << EOT
54 CFLAGS += -I${sysroot}/usr/include/libnl3
55 CFLAGS += -I${sysroot}/usr/include/openssl
56 LIBS += -L${sysroot}/usr/lib
57 EOT
58 ;;
59 esac
60 make BINDIR=/usr/bin LIBDIR=/lib
61 }
63 # Rules to gen a SliTaz package suitable for Tazpkg.
64 genpkg_rules()
65 {
66 mkdir -p $install/usr/share/man
67 cp $src/wpa_supplicant/doc/docbook/*.? $install/usr/share/man
69 # commands
70 mkdir -p $fs/usr/bin
71 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
72 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
73 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
75 # D-Bus control
76 mkdir -p $fs/usr/share/dbus-1/system-services
77 install -v -m644 \
78 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
79 $fs/usr/share/dbus-1/system-services
81 mkdir -p $fs/etc/dbus-1/system.d
82 install -v -m644 \
83 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
84 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
86 # Startup script and cleaned up wpa_empty.conf
87 cp -a $stuff/etc $fs
88 install -m644 -oroot -groot $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
89 }
91 # Pre and post install commands for Tazpkg.
92 post_install()
93 {
94 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" << EOT
96 # wpa_supplicant daemon options
97 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
99 EOT
100 # We use /etc/wpa/wpa.conf from SliTaz 5.0
101 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ "$1/etc/daemons.conf" 2> /dev/null
102 # 'w' option dont exist anymore with < 0.6.9
103 sed -i s/'-Bw'/'-B'/ "$1/etc/daemons.conf" 2> /dev/null
104 sed -i s/'-B -w'/'-B'/g "$1/etc/init.d/network.sh" 2> /dev/null
105 }