wok view wpa_supplicant/receipt @ rev 14714

lib[a-n]*: add LICENSE
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jun 11 10:41:23 2013 +0200 (2013-06-11)
parents 4add24f117c1
children 7896f0694ef6
line source
1 # SliTaz package receipt.
3 PACKAGE="wpa_supplicant"
4 VERSION="1.1"
5 CATEGORY="utilities"
6 SHORT_DESC="WPA Supplicant with support for WPA and WPA2"
7 MAINTAINER="0dddba11@googlemail.com"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://hostap.epitest.fi/wpa_supplicant/"
10 WGET_URL="http://hostap.epitest.fi/releases/$TARBALL"
11 CONFIG_FILES="/etc/wpa_supplicant.conf"
12 TAGS="wireless"
14 DEPENDS="libssl slitaz-base-files libcrypto libnl"
15 BUILD_DEPENDS="openssl-dev libcrypto libcrypto-dev libnl-dev dbus-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src/$PACKAGE
21 sed 's/-lnl/-lnl-3/g' -i ../src/drivers/drivers.mak
22 sed 's/-lnl-3-genl/-lnl-genl-3/g' -i ../src/drivers/drivers.mak
23 cp -a ./defconfig ./.config
24 cat >> .config << EOF
25 CONFIG_AP=y
26 CONFIG_BGSCAN_SIMPLE=y
27 CONFIG_CTRL_IFACE_DBUS=y
28 CONFIG_CTRL_IFACE_DBUS_NEW=y
29 CONFIG_CTRL_IFACE_DBUS_INTRO=y
30 CONFIG_LIBNL20=y
31 CFLAGS += -I/usr/include/libnl3
32 EOF
33 make BINDIR=/usr/bin LIBDIR=/lib
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 # commands
40 mkdir -p $fs/usr/bin
41 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
42 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
43 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
45 # D-Bus control
46 mkdir -p $fs/usr/share/dbus-1/system-services
47 install -v -m644 \
48 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \
49 $fs/usr/share/dbus-1/system-services
50 install -v -m644 \
51 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
52 $fs/usr/share/dbus-1/system-services
54 mkdir -p $fs/etc/dbus-1/system.d
55 install -v -m644 \
56 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
57 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
59 # Startup script and cleaned up wpa_supplicant.conf
60 cp -a stuff/etc $fs
61 # dont copy the original
62 # cp -a $src/$PACKAGE/wpa_supplicant.conf $fs/etc
63 }
65 # Pre and post install commands for Tazpkg.
66 post_install()
67 {
68 grep -q ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> $1/etc/daemons.conf <<EOT
69 # wpa_supplicant daemon options
70 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa_supplicant.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
72 EOT
73 # 'w' option dont exist anymore with < 0.6.9
74 sed -i s/'-Bw'/'-B'/ $1/etc/daemons.conf
75 sed -i s/'-B -w'/'-B'/g $1/etc/init.d/network.sh
76 }