wok-next view connman/receipt @ rev 14509

get-src2pkg: fix pkg name
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue May 14 07:41:25 2013 +0200 (2013-05-14)
parents 0199371990b2
children 7896f0694ef6
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 libgcrypt udev wpa_supplicant
13 dbus-helper"
14 BUILD_DEPENDS="glib-dev dbus-dev iptables-dev gnutls-dev libnl-dev
15 openconnect udev-dev wpa_supplicant readline-dev ncursesw-dev openvpn
16 bluez-dev ppp-dev"
17 SUGGESTED="xl2tpd pptpclient"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 # add dependency on libncurses.so,
23 sed -i 's/-lreadline/-lreadline -lncurses/' Makefile.in
24 cd $src
25 ./configure \
26 --prefix=/usr \
27 --sysconfdir=/etc \
28 --localstatedir=/var \
29 --infodir=/usr/share/info \
30 --mandir=/usr/share/man \
31 --disable-gtk-doc \
32 --disable-neard \
33 --enable-threads \
34 --enable-polkit \
35 --enable-openconnect \
36 --enable-vpnc \
37 --enable-openvpn \
38 --enable-client \
39 --enable-test \
40 $CONFIGURE_ARGS &&
41 make && make DESTDIR=$DESTDIR install
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 # dbus conf
48 mkdir -p $fs/etc
49 cp -a $install/etc/dbus-1 $fs/etc
50 # conman exec
51 mkdir -p $fs/usr
52 cp -a $install/usr/sbin $fs/usr
53 # libs
54 mkdir -p $fs/usr/lib/connman/plugins-vpn
55 cp -a $install/usr/lib/connman/plugins-vpn/*.so \
56 $fs/usr/lib/connman/plugins-vpn
57 # vpn scripts
58 mkdir -p $fs/usr/lib/connman/scripts
59 cp -a $install/usr/lib/connman/scripts $fs/usr/lib/connman
60 # init script
61 cp -a $stuff/etc $fs
62 }
64 # Pre and post remove commands for Tazpkg
65 post_install()
66 {
67 local root=$1
68 if ! grep -q ^CONNMAND_OPTIONS $root/etc/daemons.conf; then
69 echo '# Connman daemon options.' >> $root/etc/daemons.conf
70 echo 'CONNMAND_OPTIONS=""' >> $root/etc/daemons.conf
71 echo '' >> $root/etc/daemons.conf
72 fi
73 if [ -z "$root" ]; then
74 /etc/init.d/connman start || /etc/init.d/connman restart
75 fi
76 }
78 pre_remove()
79 {
80 if [ -z "$1" ]; then
81 /etc/init.d/connman stop
82 fi
83 }