wok view wpa_supplicant/receipt @ rev 15002

Add some GPL2 licenses
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 10 21:12:16 2013 +0000 (2013-08-10)
parents 01ad1e61b761
children 3196dad7fb36
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 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://hostap.epitest.fi/wpa_supplicant/"
11 WGET_URL="http://hostap.epitest.fi/releases/$TARBALL"
12 CONFIG_FILES="/etc/wpa_supplicant.conf"
13 TAGS="wireless"
15 DEPENDS="libssl slitaz-base-files libcrypto libnl"
16 BUILD_DEPENDS="openssl-dev libcrypto libcrypto-dev libnl-dev dbus-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src/$PACKAGE
22 sed 's/-lnl/-lnl-3/g' -i ../src/drivers/drivers.mak
23 sed 's/-lnl-3-genl/-lnl-genl-3/g' -i ../src/drivers/drivers.mak
24 cp -a ./defconfig ./.config
25 cat >> .config << EOF
26 CONFIG_AP=y
27 CONFIG_BGSCAN_SIMPLE=y
28 CONFIG_CTRL_IFACE_DBUS=y
29 CONFIG_CTRL_IFACE_DBUS_NEW=y
30 CONFIG_CTRL_IFACE_DBUS_INTRO=y
31 CONFIG_LIBNL20=y
32 CFLAGS += -I/usr/include/libnl3
33 EOF
34 make BINDIR=/usr/bin LIBDIR=/lib
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 # commands
41 mkdir -p $fs/usr/bin
42 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
43 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
44 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
46 # D-Bus control
47 mkdir -p $fs/usr/share/dbus-1/system-services
48 install -v -m644 \
49 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \
50 $fs/usr/share/dbus-1/system-services
51 install -v -m644 \
52 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
53 $fs/usr/share/dbus-1/system-services
55 mkdir -p $fs/etc/dbus-1/system.d
56 install -v -m644 \
57 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
58 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
60 # Startup script and cleaned up wpa_supplicant.conf
61 cp -a stuff/etc $fs
62 # dont copy the original
63 # cp -a $src/$PACKAGE/wpa_supplicant.conf $fs/etc
64 }
66 # Pre and post install commands for Tazpkg.
67 post_install()
68 {
69 grep -q ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> $1/etc/daemons.conf <<EOT
70 # wpa_supplicant daemon options
71 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa_supplicant.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
73 EOT
74 # 'w' option dont exist anymore with < 0.6.9
75 sed -i s/'-Bw'/'-B'/ $1/etc/daemons.conf
76 sed -i s/'-B -w'/'-B'/g $1/etc/init.d/network.sh
77 }