wok-6.x annotate wpa_supplicant/receipt @ rev 24380

blender: added implicite build dependency libboost-locale
author Hans-G?nter Theisgen
date Sun Feb 06 10:08:38 2022 +0100 (2022-02-06)
parents bf5e98cbe36f
children
rev   line source
0dddba11@861 1 # SliTaz package receipt.
0dddba11@861 2
0dddba11@861 3 PACKAGE="wpa_supplicant"
pascal@21872 4 VERSION="2.9"
0dddba11@861 5 CATEGORY="utilities"
0dddba11@861 6 SHORT_DESC="WPA Supplicant with support for WPA and WPA2"
0dddba11@861 7 MAINTAINER="0dddba11@googlemail.com"
pascal@15002 8 LICENSE="GPL2"
0dddba11@861 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@21872 10 WEB_SITE="https://w1.fi/wpa_supplicant"
pascal@21872 11 WGET_URL="${WEB_SITE%/*}/releases/$TARBALL"
al@18599 12 CONFIG_FILES="/etc/wpa/wpa_supplicant.conf"
pankso@16054 13 TAGS="wireless wifi network"
pankso@16027 14 HOST_ARCH="i486 arm"
pankso@16027 15
pascal@19844 16 DEPENDS="libssl libcrypto libnl dbus pcsc-lite"
pascal@19844 17 BUILD_DEPENDS="openssl-dev libcrypto-dev libnl-dev dbus-dev pcsc-lite-dev"
0dddba11@861 18
pankso@16056 19 # Arch install
pankso@16056 20 case "$SLITAZ_ARCH" in
pankso@16056 21 arm*) DEPENDS="libssl libcrypto libnl" ;;
pankso@16056 22 esac
pankso@16056 23
pankso@16027 24 # Cross compile
pankso@16027 25 case "$ARCH" in
pankso@16056 26 arm*) BUILD_DEPENDS="openssl-dev libcrypto-dev libnl-dev" ;;
pankso@16027 27 esac
domcox@14382 28
pascal@24013 29 current_version()
pascal@24013 30 {
pascal@24013 31 wget -O - $WEB_SITE 2>/dev/null | \
pascal@24013 32 sed '/releases\//!d;s|.*/'$PACKAGE'-||;s|.t.*||;q'
pascal@24013 33 }
pascal@24013 34
0dddba11@861 35 # Rules to configure and make the package.
0dddba11@861 36 compile_rules()
0dddba11@861 37 {
mojo@20131 38 cd $src/$PACKAGE
0dddba11@861 39 cp -a ./defconfig ./.config
pankso@16056 40 # Main build configs
pankso@16056 41 cat >> .config << EOT
domcox@14382 42 CONFIG_AP=y
domcox@14382 43 CONFIG_BGSCAN_SIMPLE=y
pankso@16027 44 CONFIG_LIBNL20=y
pascal@24013 45 CONFIG_USIM_SIMULATOR=y
pascal@24013 46 CONFIG_SIM_SIMULATOR=y
pankso@16056 47 EOT
pankso@16056 48 # Dont use DBUS on ARM arch
pankso@16056 49 case "$ARCH" in
pankso@16056 50 i?86)
pankso@16056 51 cat >> .config << EOT
pankso@16027 52 CFLAGS += -I/usr/include/libnl3
domcox@14382 53 CONFIG_CTRL_IFACE_DBUS=y
domcox@14382 54 CONFIG_CTRL_IFACE_DBUS_NEW=y
domcox@14382 55 CONFIG_CTRL_IFACE_DBUS_INTRO=y
pascal@19844 56 CONFIG_EAP_SIM=y
pascal@19844 57 CONFIG_PCSC=y
pankso@16056 58 EOT
pankso@16027 59 ;;
pankso@16027 60 arm)
pankso@16056 61 cat >> .config << EOT
pankso@16056 62 CFLAGS += -I${sysroot}/usr/include/libnl3
pankso@16056 63 CFLAGS += -I${sysroot}/usr/include/openssl
pankso@16056 64 LIBS += -L${sysroot}/usr/lib
pankso@16056 65 EOT
pankso@16056 66 ;;
pankso@16027 67 esac
domcox@14382 68 make BINDIR=/usr/bin LIBDIR=/lib
0dddba11@861 69 }
0dddba11@861 70
0dddba11@861 71 # Rules to gen a SliTaz package suitable for Tazpkg.
0dddba11@861 72 genpkg_rules()
0dddba11@861 73 {
pascal@21873 74 mkdir -p $install/usr/share/man
pascal@21873 75 cp $src/wpa_supplicant/doc/docbook/*.? $install/usr/share/man
pascal@21873 76
domcox@14382 77 # commands
0dddba11@861 78 mkdir -p $fs/usr/bin
domcox@14382 79 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
domcox@14382 80 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
domcox@14382 81 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
pankso@4333 82
domcox@14382 83 # D-Bus control
domcox@14382 84 mkdir -p $fs/usr/share/dbus-1/system-services
domcox@14382 85 install -v -m644 \
domcox@14382 86 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
domcox@14382 87 $fs/usr/share/dbus-1/system-services
domcox@14382 88
domcox@14382 89 mkdir -p $fs/etc/dbus-1/system.d
domcox@14382 90 install -v -m644 \
domcox@14382 91 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
domcox@14382 92 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
pankso@4333 93
pankso@15914 94 # Startup script and cleaned up wpa_empty.conf
pankso@15914 95 cp -a $stuff/etc $fs
al@17925 96 install -m644 -oroot -groot $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
pascal@24013 97
pascal@24013 98 cat >> $fs/etc/wpa/wpa_supplicant.conf <<EOT
pascal@24013 99
pascal@24013 100 # SIM emulation example
pascal@24013 101 network={
pascal@24013 102 ssid="exampleFreeWifi_secure"
pascal@24013 103 key_mgmt=WPA-EAP
pascal@24013 104 eap=SIM
pascal@24013 105 identity="1232010000000000"
pascal@24013 106 password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581"
pascal@24013 107 }
pascal@24013 108 EOT
0dddba11@861 109 }
0dddba11@861 110
pascal@938 111 # Pre and post install commands for Tazpkg.
pascal@938 112 post_install()
pascal@938 113 {
pascal@18730 114 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" << EOT
pankso@15914 115
pascal@938 116 # wpa_supplicant daemon options
pankso@15914 117 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
pascal@938 118
pascal@938 119 EOT
pankso@15914 120 # We use /etc/wpa/wpa.conf from SliTaz 5.0
pascal@18730 121 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ "$1/etc/daemons.conf" 2> /dev/null
pankso@3400 122 # 'w' option dont exist anymore with < 0.6.9
pascal@18730 123 sed -i s/'-Bw'/'-B'/ "$1/etc/daemons.conf" 2> /dev/null
pascal@18730 124 sed -i s/'-B -w'/'-B'/g "$1/etc/init.d/network.sh" 2> /dev/null
pascal@938 125 }