wok view connman/receipt @ rev 14383

connman: fix deps+bdeps
author Dominique Corbex <domcox@slitaz.org>
date Tue Apr 23 06:56:06 2013 +0200 (2013-04-23)
parents d8e8e6421a2c
children 0dd28335895d
line source
1 # SliTaz package receipt.
3 PACKAGE="connman"
4 VERSION="1.12"
5 CATEGORY="network"
6 SHORT_DESC="Daemon for managing internet connections"
7 MAINTAINER="slaxemulator@gmail.com"
8 TARBALL="$PACKAGE-$VERSION.tar.xz"
9 WEB_SITE="http://connman.net/"
10 WGET_URL="http://linux-kernel.uio.no/pub/linux/network/$PACKAGE/$TARBALL"
12 DEPENDS="glib dbus iptables gnutls libnl udev wpa_supplicant dbus-helper"
13 BUILD_DEPENDS="glib-dev dbus-dev iptables-dev gnutls-dev libnl-dev
14 openconnect udev-dev wpa_supplicant readline-dev ncursesw-dev openvpn
15 bluez-dev ppp-dev"
16 SUGGESTED="xl2tpd pptpclient"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 # add dependency on libncurses.so,
22 sed -i 's/-lreadline/-lreadline -lncurses/' Makefile.in
23 cd $src
24 ./configure \
25 --prefix=/usr \
26 --sysconfdir=/etc \
27 --localstatedir=/var \
28 --infodir=/usr/share/info \
29 --mandir=/usr/share/man \
30 --disable-gtk-doc \
31 --disable-neard \
32 --enable-threads \
33 --enable-polkit \
34 --enable-openconnect \
35 --enable-vpnc \
36 --enable-openvpn \
37 --enable-client \
38 --enable-test \
39 $CONFIGURE_ARGS &&
40 make && make DESTDIR=$DESTDIR install
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 # dbus conf
47 mkdir -p $fs/etc
48 cp -a $install/etc/dbus-1 $fs/etc
49 # conman exec
50 mkdir -p $fs/usr
51 cp -a $install/usr/sbin $fs/usr
52 # libs
53 mkdir -p $fs/usr/lib/connman/plugins-vpn
54 cp -a $install/usr/lib/connman/plugins-vpn/*.so \
55 $fs/usr/lib/connman/plugins-vpn
56 # vpn scripts
57 mkdir -p $fs/usr/lib/connman/scripts
58 cp -a $install/usr/lib/connman/scripts $fs/usr/lib/connman
59 # init script
60 cp -a $stuff/etc $fs
61 }
63 # Pre and post remove commands for Tazpkg
64 post_install()
65 {
66 local root=$1
67 if ! grep -q ^CONNMAND_OPTIONS $root/etc/daemons.conf; then
68 echo '# Connman daemon options.' >> $root/etc/daemons.conf
69 echo 'CONNMAND_OPTIONS=""' >> $root/etc/daemons.conf
70 echo '' >> $root/etc/daemons.conf
71 fi
72 if [ -z "$root" ]; then
73 /etc/init.d/connman start || /etc/init.d/connman restart
74 fi
75 }
77 pre_remove()
78 {
79 if [ -z "$1" ]; then
80 /etc/init.d/connman stop
81 fi
82 }