wok annotate wpa_supplicant/receipt @ rev 17521

busybox: 2015
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 17 12:02:13 2015 +0100 (2015-01-17)
parents 38cdd37ed6ef
children 1df528a60782
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"
pascal@10343 12 CONFIG_FILES="/etc/wpa_supplicant.conf"
pankso@16054 13 TAGS="wireless wifi network"
pankso@16027 14 HOST_ARCH="i486 arm"
pankso@16027 15
pankso@16056 16 DEPENDS="libssl libcrypto libnl dbus"
pankso@16027 17 BUILD_DEPENDS="openssl-dev libcrypto-dev libnl-dev dbus-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
pankso@16056 50 EOT
pankso@16027 51 ;;
pankso@16027 52 arm)
pankso@16056 53 cat >> .config << EOT
pankso@16056 54 CFLAGS += -I${sysroot}/usr/include/libnl3
pankso@16056 55 CFLAGS += -I${sysroot}/usr/include/openssl
pankso@16056 56 LIBS += -L${sysroot}/usr/lib
pankso@16056 57 EOT
pankso@16056 58 ;;
pankso@16027 59 esac
domcox@14382 60 make BINDIR=/usr/bin LIBDIR=/lib
0dddba11@861 61 }
0dddba11@861 62
0dddba11@861 63 # Rules to gen a SliTaz package suitable for Tazpkg.
0dddba11@861 64 genpkg_rules()
0dddba11@861 65 {
domcox@14382 66 # commands
0dddba11@861 67 mkdir -p $fs/usr/bin
domcox@14382 68 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
domcox@14382 69 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
domcox@14382 70 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
pankso@4333 71
domcox@14382 72 # D-Bus control
domcox@14382 73 mkdir -p $fs/usr/share/dbus-1/system-services
domcox@14382 74 install -v -m644 \
domcox@14382 75 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \
domcox@14382 76 $fs/usr/share/dbus-1/system-services
domcox@14382 77 install -v -m644 \
domcox@14382 78 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
domcox@14382 79 $fs/usr/share/dbus-1/system-services
domcox@14382 80
domcox@14382 81 mkdir -p $fs/etc/dbus-1/system.d
domcox@14382 82 install -v -m644 \
domcox@14382 83 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
domcox@14382 84 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
pankso@4333 85
pankso@15914 86 # Startup script and cleaned up wpa_empty.conf
pankso@15914 87 cp -a $stuff/etc $fs
pankso@15914 88 cp -a $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
0dddba11@861 89 }
0dddba11@861 90
pascal@938 91 # Pre and post install commands for Tazpkg.
pascal@938 92 post_install()
pascal@938 93 {
pankso@15914 94 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> $1/etc/daemons.conf << EOT
pankso@15914 95
pascal@938 96 # wpa_supplicant daemon options
pankso@15914 97 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
pascal@938 98
pascal@938 99 EOT
pankso@15914 100 # We use /etc/wpa/wpa.conf from SliTaz 5.0
pankso@15914 101 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ $1/etc/daemons.conf 2> /dev/null
pankso@3400 102 # 'w' option dont exist anymore with < 0.6.9
pascal@15645 103 sed -i s/'-Bw'/'-B'/ $1/etc/daemons.conf 2> /dev/null
pascal@15645 104 sed -i s/'-B -w'/'-B'/g $1/etc/init.d/network.sh 2> /dev/null
pascal@938 105 }