wok-next annotate wpa_supplicant/receipt @ rev 20976

Follow recent changes in the Python renames
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Sep 25 17:35:51 2018 +0300 (2018-09-25)
parents e6615350078d
children f48456621a9d
rev   line source
al@19844 1 # SliTaz package receipt v2.
0dddba11@861 2
0dddba11@861 3 PACKAGE="wpa_supplicant"
al@19844 4 VERSION="2.6"
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"
al@19844 9 WEB_SITE="http://w1.fi/wpa_supplicant/"
al@20443 10 LFS="http://www.linuxfromscratch.org/blfs/view/stable/basicnet/wpa_supplicant.html"
al@20883 11 REPOLOGY="wpa-supplicant"
pankso@16027 12
al@19844 13 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@19844 14 WGET_URL="http://w1.fi/releases/$TARBALL"
0dddba11@861 15
al@20453 16 BUILD_DEPENDS_arm="openssl-dev libnl-dev"
al@19844 17 BUILD_DEPENDS="libnl-dev dbus-dev openssl-dev readline-dev"
domcox@14382 18
al@19844 19 compile_rules() {
al@19844 20 cd $src/wpa_supplicant
al@19844 21 cp -a defconfig .config
al@19844 22
pankso@16056 23 # Main build configs
al@19844 24 cat >> .config <<EOT
al@19844 25 CONFIG_DEBUG_FILE=y
al@19844 26 CONFIG_DEBUG_SYSLOG=y
al@19844 27 CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
al@19844 28 CONFIG_IPV6=y
al@19844 29 CONFIG_LIBNL32=y
al@19844 30 CONFIG_READLINE=y
al@19844 31 CONFIG_WPS=y
domcox@14382 32 CONFIG_AP=y
domcox@14382 33 CONFIG_BGSCAN_SIMPLE=y
pankso@16056 34 EOT
al@19844 35 # Don't use DBUS on ARM arch
pankso@16056 36 case "$ARCH" in
al@20443 37 arm)
al@20443 38 cat >> .config <<EOT
al@20443 39 CFLAGS += -I${sysroot}/usr/include/libnl3
al@20443 40 CFLAGS += -I${sysroot}/usr/include/openssl
al@20443 41 LIBS += -L${sysroot}/usr/lib
al@20443 42 EOT
al@20443 43 ;;
al@20443 44 i?86|x86_64)
al@19844 45 cat >> .config <<EOT
pankso@16027 46 CFLAGS += -I/usr/include/libnl3
domcox@14382 47 CONFIG_CTRL_IFACE_DBUS=y
domcox@14382 48 CONFIG_CTRL_IFACE_DBUS_NEW=y
domcox@14382 49 CONFIG_CTRL_IFACE_DBUS_INTRO=y
pankso@16056 50 EOT
pankso@16027 51 ;;
pankso@16027 52 esac
al@19844 53 make BINDIR=/sbin LIBDIR=/lib || exit 1
al@19844 54
al@19844 55 # commands
al@19844 56 bindir="$install/sbin"
al@19844 57 mkdir -p $bindir
al@19844 58 install -vm755 wpa_cli $bindir
al@19844 59 install -vm755 wpa_passphrase $bindir
al@19844 60 install -vm755 wpa_supplicant $bindir
al@19844 61
al@19844 62 cook_pick_manpages \
al@19844 63 doc/docbook/wpa_supplicant.conf.5 \
al@19844 64 doc/docbook/wpa_cli.8 \
al@19844 65 doc/docbook/wpa_passphrase.8 \
al@19844 66 doc/docbook/wpa_supplicant.8
al@19844 67
al@19844 68 mkdir -p $install/usr/share/dbus-1/system-services
al@19844 69 install -vm644 dbus/*.service $install/usr/share/dbus-1/system-services/
al@19844 70
al@19844 71 mkdir -p $install/etc/dbus-1/system.d
al@19844 72 install -vm644 dbus/dbus-wpa_supplicant.conf \
al@19844 73 $install/etc/dbus-1/system.d/wpa_supplicant.conf
al@19844 74
al@19844 75 # Startup script and cleaned up wpa_empty.conf
al@19844 76 cp -a $stuff/etc $install
al@19844 77 install -vm644 $src/wpa_supplicant/wpa_supplicant.conf $install/etc/wpa
al@19844 78 chown -R root:root $install/etc
0dddba11@861 79 }
0dddba11@861 80
al@19844 81 genpkg_rules() {
al@19844 82 copy @std
al@20453 83 DEPENDS="dbus openssl libnl ncurses readline"
al@19844 84 CONFIG_FILES="/etc/wpa/wpa_supplicant.conf"
al@19844 85 TAGS="wireless wifi network"
al@19844 86 case "$SLITAZ_ARCH" in
al@20453 87 arm*) DEPENDS="openssl libnl";;
al@19844 88 esac
0dddba11@861 89 }
0dddba11@861 90
al@19844 91 post_install() {
al@19844 92 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" <<"EOT"
pankso@15914 93
pascal@938 94 # wpa_supplicant daemon options
al@19844 95 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i $(. /etc/network.conf; echo $WIFI_INTERFACE)"
pascal@938 96
pascal@938 97 EOT
pankso@15914 98 # We use /etc/wpa/wpa.conf from SliTaz 5.0
al@19844 99 sed -i 's|/etc/wpa_supplicant.conf|/etc/wpa/wpa.conf|' "$1/etc/daemons.conf" 2>/dev/null
al@19844 100 # 'w' option don't exist anymore with < 0.6.9
al@19844 101 sed -i 's|-Bw|-B|' "$1/etc/daemons.conf" 2>/dev/null
al@19844 102 sed -i 's|-B -w|-B|g' "$1/etc/init.d/network.sh" 2>/dev/null
pascal@938 103 }