wok-next view wpa_supplicant/receipt @ rev 18441
gambas2: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 23 22:06:04 2015 +0200 (2015-09-23) |
parents | e1174b47e40e |
children | 64618945fe80 |
line source
1 # SliTaz package receipt.
3 PACKAGE="wpa_supplicant"
4 VERSION="2.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 wifi network"
14 HOST_ARCH="i486 arm"
16 DEPENDS="libssl libcrypto libnl dbus"
17 BUILD_DEPENDS="openssl-dev libcrypto-dev libnl-dev dbus-dev"
19 # Arch install
20 case "$SLITAZ_ARCH" in
21 arm*) DEPENDS="libssl libcrypto libnl" ;;
22 esac
24 # Cross compile
25 case "$ARCH" in
26 arm*) BUILD_DEPENDS="openssl-dev libcrypto-dev libnl-dev" ;;
27 esac
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 cd $src/$PACKAGE
33 cp -a ./defconfig ./.config
34 sed 's/-lnl/-lnl-3/g' -i ../src/drivers/drivers.mak
35 sed 's/-lnl-3-genl/-lnl-genl-3/g' -i ../src/drivers/drivers.mak
36 # Main build configs
37 cat >> .config << EOT
38 CONFIG_AP=y
39 CONFIG_BGSCAN_SIMPLE=y
40 CONFIG_LIBNL20=y
41 EOT
42 # Dont use DBUS on ARM arch
43 case "$ARCH" in
44 i?86)
45 cat >> .config << EOT
46 CFLAGS += -I/usr/include/libnl3
47 CONFIG_CTRL_IFACE_DBUS=y
48 CONFIG_CTRL_IFACE_DBUS_NEW=y
49 CONFIG_CTRL_IFACE_DBUS_INTRO=y
50 EOT
51 ;;
52 arm)
53 cat >> .config << EOT
54 CFLAGS += -I${sysroot}/usr/include/libnl3
55 CFLAGS += -I${sysroot}/usr/include/openssl
56 LIBS += -L${sysroot}/usr/lib
57 EOT
58 ;;
59 esac
60 make BINDIR=/usr/bin LIBDIR=/lib
61 }
63 # Rules to gen a SliTaz package suitable for Tazpkg.
64 genpkg_rules()
65 {
66 # commands
67 mkdir -p $fs/usr/bin
68 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
69 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
70 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
72 # D-Bus control
73 mkdir -p $fs/usr/share/dbus-1/system-services
74 install -v -m644 \
75 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \
76 $fs/usr/share/dbus-1/system-services
77 install -v -m644 \
78 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
79 $fs/usr/share/dbus-1/system-services
81 mkdir -p $fs/etc/dbus-1/system.d
82 install -v -m644 \
83 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
84 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
86 # Startup script and cleaned up wpa_empty.conf
87 cp -a $stuff/etc $fs
88 install -m644 -oroot -groot $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
89 }
91 # Pre and post install commands for Tazpkg.
92 post_install()
93 {
94 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> $1/etc/daemons.conf << EOT
96 # wpa_supplicant daemon options
97 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
99 EOT
100 # We use /etc/wpa/wpa.conf from SliTaz 5.0
101 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ $1/etc/daemons.conf 2> /dev/null
102 # 'w' option dont exist anymore with < 0.6.9
103 sed -i s/'-Bw'/'-B'/ $1/etc/daemons.conf 2> /dev/null
104 sed -i s/'-B -w'/'-B'/g $1/etc/init.d/network.sh 2> /dev/null
105 }