wok annotate 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 |
rev | line source |
---|---|
0dddba11@861 | 1 # SliTaz package receipt. |
0dddba11@861 | 2 |
0dddba11@861 | 3 PACKAGE="wpa_supplicant" |
pankso@15914 | 4 VERSION="2.1" |
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" |
0dddba11@861 | 10 WEB_SITE="http://hostap.epitest.fi/wpa_supplicant/" |
0dddba11@861 | 11 WGET_URL="http://hostap.epitest.fi/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 |
0dddba11@861 | 29 # Rules to configure and make the package. |
0dddba11@861 | 30 compile_rules() |
0dddba11@861 | 31 { |
jozee@3329 | 32 cd $src/$PACKAGE |
0dddba11@861 | 33 cp -a ./defconfig ./.config |
pankso@16056 | 34 sed 's/-lnl/-lnl-3/g' -i ../src/drivers/drivers.mak |
pankso@16056 | 35 sed 's/-lnl-3-genl/-lnl-genl-3/g' -i ../src/drivers/drivers.mak |
pankso@16056 | 36 # Main build configs |
pankso@16056 | 37 cat >> .config << EOT |
domcox@14382 | 38 CONFIG_AP=y |
domcox@14382 | 39 CONFIG_BGSCAN_SIMPLE=y |
pankso@16027 | 40 CONFIG_LIBNL20=y |
pankso@16056 | 41 EOT |
pankso@16056 | 42 # Dont use DBUS on ARM arch |
pankso@16056 | 43 case "$ARCH" in |
pankso@16056 | 44 i?86) |
pankso@16056 | 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 |
pascal@19844 | 50 CONFIG_EAP_SIM=y |
pascal@19844 | 51 CONFIG_PCSC=y |
pankso@16056 | 52 EOT |
pankso@16027 | 53 ;; |
pankso@16027 | 54 arm) |
pankso@16056 | 55 cat >> .config << EOT |
pankso@16056 | 56 CFLAGS += -I${sysroot}/usr/include/libnl3 |
pankso@16056 | 57 CFLAGS += -I${sysroot}/usr/include/openssl |
pankso@16056 | 58 LIBS += -L${sysroot}/usr/lib |
pankso@16056 | 59 EOT |
pankso@16056 | 60 ;; |
pankso@16027 | 61 esac |
domcox@14382 | 62 make BINDIR=/usr/bin LIBDIR=/lib |
0dddba11@861 | 63 } |
0dddba11@861 | 64 |
0dddba11@861 | 65 # Rules to gen a SliTaz package suitable for Tazpkg. |
0dddba11@861 | 66 genpkg_rules() |
0dddba11@861 | 67 { |
domcox@14382 | 68 # commands |
0dddba11@861 | 69 mkdir -p $fs/usr/bin |
domcox@14382 | 70 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin |
domcox@14382 | 71 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin |
domcox@14382 | 72 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin |
pankso@4333 | 73 |
domcox@14382 | 74 # D-Bus control |
domcox@14382 | 75 mkdir -p $fs/usr/share/dbus-1/system-services |
domcox@14382 | 76 install -v -m644 \ |
domcox@14382 | 77 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \ |
domcox@14382 | 78 $fs/usr/share/dbus-1/system-services |
domcox@14382 | 79 install -v -m644 \ |
domcox@14382 | 80 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \ |
domcox@14382 | 81 $fs/usr/share/dbus-1/system-services |
domcox@14382 | 82 |
domcox@14382 | 83 mkdir -p $fs/etc/dbus-1/system.d |
domcox@14382 | 84 install -v -m644 \ |
domcox@14382 | 85 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \ |
domcox@14382 | 86 $fs/etc/dbus-1/system.d/wpa_supplicant.conf |
pankso@4333 | 87 |
pankso@15914 | 88 # Startup script and cleaned up wpa_empty.conf |
pankso@15914 | 89 cp -a $stuff/etc $fs |
al@17925 | 90 install -m644 -oroot -groot $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa |
0dddba11@861 | 91 } |
0dddba11@861 | 92 |
pascal@938 | 93 # Pre and post install commands for Tazpkg. |
pascal@938 | 94 post_install() |
pascal@938 | 95 { |
pascal@18730 | 96 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> "$1/etc/daemons.conf" << EOT |
pankso@15914 | 97 |
pascal@938 | 98 # wpa_supplicant daemon options |
pankso@15914 | 99 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)" |
pascal@938 | 100 |
pascal@938 | 101 EOT |
pankso@15914 | 102 # We use /etc/wpa/wpa.conf from SliTaz 5.0 |
pascal@18730 | 103 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ "$1/etc/daemons.conf" 2> /dev/null |
pankso@3400 | 104 # 'w' option dont exist anymore with < 0.6.9 |
pascal@18730 | 105 sed -i s/'-Bw'/'-B'/ "$1/etc/daemons.conf" 2> /dev/null |
pascal@18730 | 106 sed -i s/'-B -w'/'-B'/g "$1/etc/init.d/network.sh" 2> /dev/null |
pascal@938 | 107 } |