wok-current view wpa_supplicant/receipt @ rev 24703
updated ladspa and ladspa-dev (1.15 -> 1.17)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Mar 14 11:12:41 2022 +0100 (2022-03-14) |
parents | bf5e98cbe36f |
children | 3ad63c8fc2f9 |
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 current_version()
30 {
31 wget -O - $WEB_SITE 2>/dev/null | \
32 sed '/releases\//!d;s|.*/'$PACKAGE'-||;s|.t.*||;q'
33 }
35 # Rules to configure and make the package.
36 compile_rules()
37 {
38 cd $src/$PACKAGE
39 cp -a ./defconfig ./.config
40 # Main build configs
41 cat >> .config << EOT
42 CONFIG_AP=y
43 CONFIG_BGSCAN_SIMPLE=y
44 CONFIG_LIBNL20=y
45 CONFIG_USIM_SIMULATOR=y
46 CONFIG_SIM_SIMULATOR=y
47 EOT
48 # Dont use DBUS on ARM arch
49 case "$ARCH" in
50 i?86)
51 cat >> .config << EOT
52 CFLAGS += -I/usr/include/libnl3
53 CONFIG_CTRL_IFACE_DBUS=y
54 CONFIG_CTRL_IFACE_DBUS_NEW=y
55 CONFIG_CTRL_IFACE_DBUS_INTRO=y
56 CONFIG_EAP_SIM=y
57 CONFIG_PCSC=y
58 EOT
59 ;;
60 arm)
61 cat >> .config << EOT
62 CFLAGS += -I${sysroot}/usr/include/libnl3
63 CFLAGS += -I${sysroot}/usr/include/openssl
64 LIBS += -L${sysroot}/usr/lib
65 EOT
66 ;;
67 esac
68 make BINDIR=/usr/bin LIBDIR=/lib
69 }
71 # Rules to gen a SliTaz package suitable for Tazpkg.
72 genpkg_rules()
73 {
74 mkdir -p $install/usr/share/man
75 cp $src/wpa_supplicant/doc/docbook/*.? $install/usr/share/man
77 # commands
78 mkdir -p $fs/usr/bin
79 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
80 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
81 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
83 # D-Bus control
84 mkdir -p $fs/usr/share/dbus-1/system-services
85 install -v -m644 \
86 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
87 $fs/usr/share/dbus-1/system-services
89 mkdir -p $fs/etc/dbus-1/system.d
90 install -v -m644 \
91 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
92 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
94 # Startup script and cleaned up wpa_empty.conf
95 cp -a $stuff/etc $fs
96 install -m644 -oroot -groot $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
98 cat >> $fs/etc/wpa/wpa_supplicant.conf <<EOT
100 # SIM emulation example
101 network={
102 ssid="exampleFreeWifi_secure"
103 key_mgmt=WPA-EAP
104 eap=SIM
105 identity="1232010000000000"
106 password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581"
107 }
108 EOT
109 }
111 # Pre and post install commands for Tazpkg.
112 post_install()
113 {
114 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" << EOT
116 # wpa_supplicant daemon options
117 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
119 EOT
120 # We use /etc/wpa/wpa.conf from SliTaz 5.0
121 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ "$1/etc/daemons.conf" 2> /dev/null
122 # 'w' option dont exist anymore with < 0.6.9
123 sed -i s/'-Bw'/'-B'/ "$1/etc/daemons.conf" 2> /dev/null
124 sed -i s/'-B -w'/'-B'/g "$1/etc/init.d/network.sh" 2> /dev/null
125 }