wok-current annotate wpa_supplicant/receipt @ rev 15914
Update wpa_supplicant (2.1) And use /etc/wpa
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Feb 15 19:55:40 2014 +0100 (2014-02-15) |
parents | 3196dad7fb36 |
children | e47c0281ba48 |
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" |
jozee@4976 | 13 TAGS="wireless" |
0dddba11@861 | 14 |
domcox@14382 | 15 DEPENDS="libssl slitaz-base-files libcrypto libnl" |
domcox@14382 | 16 BUILD_DEPENDS="openssl-dev libcrypto libcrypto-dev libnl-dev dbus-dev" |
domcox@14382 | 17 |
0dddba11@861 | 18 # Rules to configure and make the package. |
0dddba11@861 | 19 compile_rules() |
0dddba11@861 | 20 { |
jozee@3329 | 21 cd $src/$PACKAGE |
pascal@13467 | 22 sed 's/-lnl/-lnl-3/g' -i ../src/drivers/drivers.mak |
pascal@13467 | 23 sed 's/-lnl-3-genl/-lnl-genl-3/g' -i ../src/drivers/drivers.mak |
0dddba11@861 | 24 cp -a ./defconfig ./.config |
pascal@13467 | 25 cat >> .config << EOF |
domcox@14382 | 26 CONFIG_AP=y |
domcox@14382 | 27 CONFIG_BGSCAN_SIMPLE=y |
domcox@14382 | 28 CONFIG_CTRL_IFACE_DBUS=y |
domcox@14382 | 29 CONFIG_CTRL_IFACE_DBUS_NEW=y |
domcox@14382 | 30 CONFIG_CTRL_IFACE_DBUS_INTRO=y |
pascal@13467 | 31 CONFIG_LIBNL20=y |
pascal@13467 | 32 CFLAGS += -I/usr/include/libnl3 |
pascal@13467 | 33 EOF |
domcox@14382 | 34 make BINDIR=/usr/bin LIBDIR=/lib |
0dddba11@861 | 35 } |
0dddba11@861 | 36 |
0dddba11@861 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
0dddba11@861 | 38 genpkg_rules() |
0dddba11@861 | 39 { |
domcox@14382 | 40 # commands |
0dddba11@861 | 41 mkdir -p $fs/usr/bin |
domcox@14382 | 42 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin |
domcox@14382 | 43 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin |
domcox@14382 | 44 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin |
pankso@4333 | 45 |
domcox@14382 | 46 # D-Bus control |
domcox@14382 | 47 mkdir -p $fs/usr/share/dbus-1/system-services |
domcox@14382 | 48 install -v -m644 \ |
domcox@14382 | 49 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \ |
domcox@14382 | 50 $fs/usr/share/dbus-1/system-services |
domcox@14382 | 51 install -v -m644 \ |
domcox@14382 | 52 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \ |
domcox@14382 | 53 $fs/usr/share/dbus-1/system-services |
domcox@14382 | 54 |
domcox@14382 | 55 mkdir -p $fs/etc/dbus-1/system.d |
domcox@14382 | 56 install -v -m644 \ |
domcox@14382 | 57 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \ |
domcox@14382 | 58 $fs/etc/dbus-1/system.d/wpa_supplicant.conf |
pankso@4333 | 59 |
pankso@15914 | 60 # Startup script and cleaned up wpa_empty.conf |
pankso@15914 | 61 cp -a $stuff/etc $fs |
pankso@15914 | 62 cp -a $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa |
0dddba11@861 | 63 } |
0dddba11@861 | 64 |
pascal@938 | 65 # Pre and post install commands for Tazpkg. |
pascal@938 | 66 post_install() |
pascal@938 | 67 { |
pankso@15914 | 68 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> $1/etc/daemons.conf << EOT |
pankso@15914 | 69 |
pascal@938 | 70 # wpa_supplicant daemon options |
pankso@15914 | 71 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)" |
pascal@938 | 72 |
pascal@938 | 73 EOT |
pankso@15914 | 74 # We use /etc/wpa/wpa.conf from SliTaz 5.0 |
pankso@15914 | 75 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ $1/etc/daemons.conf 2> /dev/null |
pankso@3400 | 76 # 'w' option dont exist anymore with < 0.6.9 |
pascal@15645 | 77 sed -i s/'-Bw'/'-B'/ $1/etc/daemons.conf 2> /dev/null |
pascal@15645 | 78 sed -i s/'-B -w'/'-B'/g $1/etc/init.d/network.sh 2> /dev/null |
pascal@938 | 79 } |