wok-current view wpa_supplicant/receipt @ rev 25668

Update firmware, fix sound linux packages
author Stanislas Leduc <shann@slitaz.org>
date Sat Mar 02 20:44:59 2024 +0000 (3 months ago)
parents 3ad63c8fc2f9
children
line source
1 # SliTaz package receipt.
3 PACKAGE="wpa_supplicant"
4 VERSION="2.10"
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 # CVE-2023-52160
39 patch -p1 < $stuff/CVE-2023-52160.patch
41 cd $src/$PACKAGE
42 cp -a ./defconfig ./.config
43 # Main build configs
44 cat >> .config << EOT
45 CONFIG_AP=y
46 CONFIG_BGSCAN_SIMPLE=y
47 CONFIG_LIBNL20=y
48 CONFIG_USIM_SIMULATOR=y
49 CONFIG_SIM_SIMULATOR=y
50 EOT
51 # Dont use DBUS on ARM arch
52 case "$ARCH" in
53 i?86)
54 cat >> .config << EOT
55 CFLAGS += -I/usr/include/libnl3
56 CONFIG_CTRL_IFACE_DBUS=y
57 CONFIG_CTRL_IFACE_DBUS_NEW=y
58 CONFIG_CTRL_IFACE_DBUS_INTRO=y
59 CONFIG_EAP_SIM=y
60 CONFIG_PCSC=y
61 EOT
62 ;;
63 arm)
64 cat >> .config << EOT
65 CFLAGS += -I${sysroot}/usr/include/libnl3
66 CFLAGS += -I${sysroot}/usr/include/openssl
67 LIBS += -L${sysroot}/usr/lib
68 EOT
69 ;;
70 esac
71 make BINDIR=/usr/bin LIBDIR=/lib
72 }
74 # Rules to gen a SliTaz package suitable for Tazpkg.
75 genpkg_rules()
76 {
77 mkdir -p $install/usr/share/man
78 cp $src/wpa_supplicant/doc/docbook/*.? $install/usr/share/man
80 # commands
81 mkdir -p $fs/usr/bin
82 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
83 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
84 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
86 # D-Bus control
87 mkdir -p $fs/usr/share/dbus-1/system-services
88 install -v -m644 \
89 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
90 $fs/usr/share/dbus-1/system-services
92 mkdir -p $fs/etc/dbus-1/system.d
93 install -v -m644 \
94 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
95 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
97 # Startup script and cleaned up wpa_empty.conf
98 cp -a $stuff/etc $fs
99 install -m644 -oroot -groot $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
101 cat >> $fs/etc/wpa/wpa_supplicant.conf <<EOT
103 # SIM emulation example
104 network={
105 ssid="exampleFreeWifi_secure"
106 key_mgmt=WPA-EAP
107 eap=SIM
108 identity="1232010000000000"
109 password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581"
110 }
111 EOT
112 }
114 # Pre and post install commands for Tazpkg.
115 post_install()
116 {
117 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" << EOT
119 # wpa_supplicant daemon options
120 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
122 EOT
123 # We use /etc/wpa/wpa.conf from SliTaz 5.0
124 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ "$1/etc/daemons.conf" 2> /dev/null
125 # 'w' option dont exist anymore with < 0.6.9
126 sed -i s/'-Bw'/'-B'/ "$1/etc/daemons.conf" 2> /dev/null
127 sed -i s/'-B -w'/'-B'/g "$1/etc/init.d/network.sh" 2> /dev/null
128 }