wok-current annotate wpa_supplicant/receipt @ rev 14382

Up: wpa_supplicant (1.11)
author Dominique Corbex <domcox@slitaz.org>
date Mon Apr 22 23:05:52 2013 +0200 (2013-04-22)
parents 4add24f117c1
children 7896f0694ef6
rev   line source
0dddba11@861 1 # SliTaz package receipt.
0dddba11@861 2
0dddba11@861 3 PACKAGE="wpa_supplicant"
domcox@14382 4 VERSION="1.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"
0dddba11@861 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
0dddba11@861 9 WEB_SITE="http://hostap.epitest.fi/wpa_supplicant/"
0dddba11@861 10 WGET_URL="http://hostap.epitest.fi/releases/$TARBALL"
pascal@10343 11 CONFIG_FILES="/etc/wpa_supplicant.conf"
jozee@4976 12 TAGS="wireless"
0dddba11@861 13
domcox@14382 14 DEPENDS="libssl slitaz-base-files libcrypto libnl"
domcox@14382 15 BUILD_DEPENDS="openssl-dev libcrypto libcrypto-dev libnl-dev dbus-dev"
domcox@14382 16
0dddba11@861 17 # Rules to configure and make the package.
0dddba11@861 18 compile_rules()
0dddba11@861 19 {
jozee@3329 20 cd $src/$PACKAGE
pascal@13467 21 sed 's/-lnl/-lnl-3/g' -i ../src/drivers/drivers.mak
pascal@13467 22 sed 's/-lnl-3-genl/-lnl-genl-3/g' -i ../src/drivers/drivers.mak
0dddba11@861 23 cp -a ./defconfig ./.config
pascal@13467 24 cat >> .config << EOF
domcox@14382 25 CONFIG_AP=y
domcox@14382 26 CONFIG_BGSCAN_SIMPLE=y
domcox@14382 27 CONFIG_CTRL_IFACE_DBUS=y
domcox@14382 28 CONFIG_CTRL_IFACE_DBUS_NEW=y
domcox@14382 29 CONFIG_CTRL_IFACE_DBUS_INTRO=y
pascal@13467 30 CONFIG_LIBNL20=y
pascal@13467 31 CFLAGS += -I/usr/include/libnl3
pascal@13467 32 EOF
domcox@14382 33 make BINDIR=/usr/bin LIBDIR=/lib
0dddba11@861 34 }
0dddba11@861 35
0dddba11@861 36 # Rules to gen a SliTaz package suitable for Tazpkg.
0dddba11@861 37 genpkg_rules()
0dddba11@861 38 {
domcox@14382 39 # commands
0dddba11@861 40 mkdir -p $fs/usr/bin
domcox@14382 41 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
domcox@14382 42 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
domcox@14382 43 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
pankso@4333 44
domcox@14382 45 # D-Bus control
domcox@14382 46 mkdir -p $fs/usr/share/dbus-1/system-services
domcox@14382 47 install -v -m644 \
domcox@14382 48 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \
domcox@14382 49 $fs/usr/share/dbus-1/system-services
domcox@14382 50 install -v -m644 \
domcox@14382 51 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
domcox@14382 52 $fs/usr/share/dbus-1/system-services
domcox@14382 53
domcox@14382 54 mkdir -p $fs/etc/dbus-1/system.d
domcox@14382 55 install -v -m644 \
domcox@14382 56 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
domcox@14382 57 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
pankso@4333 58
jozee@3445 59 # Startup script and cleaned up wpa_supplicant.conf
0dddba11@885 60 cp -a stuff/etc $fs
domcox@14382 61 # dont copy the original
domcox@14382 62 # cp -a $src/$PACKAGE/wpa_supplicant.conf $fs/etc
0dddba11@861 63 }
0dddba11@861 64
pascal@938 65 # Pre and post install commands for Tazpkg.
pascal@938 66 post_install()
pascal@938 67 {
pascal@981 68 grep -q ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> $1/etc/daemons.conf <<EOT
pascal@938 69 # wpa_supplicant daemon options
domcox@14382 70 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa_supplicant.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
pascal@938 71
pascal@938 72 EOT
pankso@3400 73 # 'w' option dont exist anymore with < 0.6.9
pankso@3400 74 sed -i s/'-Bw'/'-B'/ $1/etc/daemons.conf
jozee@3438 75 sed -i s/'-B -w'/'-B'/g $1/etc/init.d/network.sh
pascal@938 76 }