wok view wpa_supplicant/receipt @ rev 19983

Up openvpn (2.3.17)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 22 17:37:32 2017 +0200 (2017-06-22)
parents 9e01bc6321ea
children 4d549cf7524a
line source
1 # SliTaz package receipt.
3 PACKAGE="wpa_supplicant"
4 VERSION="2.1"
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 cd $src/$PACKAGE
33 cp -a ./defconfig ./.config
34 sed 's/-lnl/-lnl-3/g' -i ../src/drivers/drivers.mak
35 sed 's/-lnl-3-genl/-lnl-genl-3/g' -i ../src/drivers/drivers.mak
36 # Main build configs
37 cat >> .config << EOT
38 CONFIG_AP=y
39 CONFIG_BGSCAN_SIMPLE=y
40 CONFIG_LIBNL20=y
41 EOT
42 # Dont use DBUS on ARM arch
43 case "$ARCH" in
44 i?86)
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 CONFIG_EAP_SIM=y
51 CONFIG_PCSC=y
52 EOT
53 ;;
54 arm)
55 cat >> .config << EOT
56 CFLAGS += -I${sysroot}/usr/include/libnl3
57 CFLAGS += -I${sysroot}/usr/include/openssl
58 LIBS += -L${sysroot}/usr/lib
59 EOT
60 ;;
61 esac
62 make BINDIR=/usr/bin LIBDIR=/lib
63 }
65 # Rules to gen a SliTaz package suitable for Tazpkg.
66 genpkg_rules()
67 {
68 # commands
69 mkdir -p $fs/usr/bin
70 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
71 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
72 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
74 # D-Bus control
75 mkdir -p $fs/usr/share/dbus-1/system-services
76 install -v -m644 \
77 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \
78 $fs/usr/share/dbus-1/system-services
79 install -v -m644 \
80 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
81 $fs/usr/share/dbus-1/system-services
83 mkdir -p $fs/etc/dbus-1/system.d
84 install -v -m644 \
85 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
86 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
88 # Startup script and cleaned up wpa_empty.conf
89 cp -a $stuff/etc $fs
90 install -m644 -oroot -groot $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
91 }
93 # Pre and post install commands for Tazpkg.
94 post_install()
95 {
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 dont 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 }