wok view wpa_supplicant/receipt @ rev 16041
syslinux/iso2exe: fix 'a la umsdos' install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 09 14:09:57 2014 +0000 (2014-03-09) |
parents | 62082fa37457 |
children | 38cdd37ed6ef |
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 HOST_ARCH="i486 arm"
15 TAGS="wireless"
16 DEPENDS="libssl libcrypto libnl"
17 BUILD_DEPENDS="openssl-dev libcrypto-dev libnl-dev dbus-dev"
19 # Cross compile
20 case "$ARCH" in
21 arm*)
22 VERSION="1.1"
23 BUILD_DEPENDS="openssl-dev libcrypto-dev"
24 TARBALL="$PACKAGE-$VERSION.tar.gz"
25 WGET_URL="http://hostap.epitest.fi/releases/$TARBALL" ;;
26 esac
28 # Arch install
29 case "$SLITAZ_ARCH" in
30 arm*) DEPENDS="libssl libcrypto" ;;
31 esac
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 cd $src/$PACKAGE
37 sed 's/-lnl/-lnl-3/g' -i ../src/drivers/drivers.mak
38 sed 's/-lnl-3-genl/-lnl-genl-3/g' -i ../src/drivers/drivers.mak
39 cp -a ./defconfig ./.config
40 case "$ARCH" in
41 i?86)
42 cat >> .config << EOF
43 CONFIG_AP=y
44 CONFIG_BGSCAN_SIMPLE=y
45 CONFIG_LIBNL20=y
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 EOF
51 ;;
52 arm)
53 # 2.X dont cross compile for ARM
54 #echo 'CFLAGS += -I${sysroot}/usr/include/libnl3' >> .config
55 continue ;;
56 esac
57 make BINDIR=/usr/bin LIBDIR=/lib
58 }
60 # Rules to gen a SliTaz package suitable for Tazpkg.
61 genpkg_rules()
62 {
63 # commands
64 mkdir -p $fs/usr/bin
65 install -v -m755 $src/$PACKAGE/wpa_cli $fs/usr/bin
66 install -v -m755 $src/$PACKAGE/wpa_supplicant $fs/usr/bin
67 install -v -m755 $src/$PACKAGE/wpa_passphrase $fs/usr/bin
69 # D-Bus control
70 mkdir -p $fs/usr/share/dbus-1/system-services
71 install -v -m644 \
72 $src/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service \
73 $fs/usr/share/dbus-1/system-services
74 install -v -m644 \
75 $src/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
76 $fs/usr/share/dbus-1/system-services
78 mkdir -p $fs/etc/dbus-1/system.d
79 install -v -m644 \
80 $src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
81 $fs/etc/dbus-1/system.d/wpa_supplicant.conf
83 # Startup script and cleaned up wpa_empty.conf
84 cp -a $stuff/etc $fs
85 cp -a $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
86 }
88 # Pre and post install commands for Tazpkg.
89 post_install()
90 {
91 grep -qs ^WPA_OPTIONS= $1/etc/daemons.conf || cat >> $1/etc/daemons.conf << EOT
93 # wpa_supplicant daemon options
94 WPA_OPTIONS="-B -u -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i \$(. /etc/network.conf ; echo \$WIFI_INTERFACE)"
96 EOT
97 # We use /etc/wpa/wpa.conf from SliTaz 5.0
98 sed -i s'#/etc/wpa_supplicant.conf#/etc/wpa/wpa.conf#'/ $1/etc/daemons.conf 2> /dev/null
99 # 'w' option dont exist anymore with < 0.6.9
100 sed -i s/'-Bw'/'-B'/ $1/etc/daemons.conf 2> /dev/null
101 sed -i s/'-B -w'/'-B'/g $1/etc/init.d/network.sh 2> /dev/null
102 }