wok-6.x view connman/receipt @ rev 15050
kino: fix genpkg_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 12 18:52:35 2013 +0000 (2013-08-12) |
parents | 7896f0694ef6 |
children | 5b22787d62d6 |
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 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.xz"
10 WEB_SITE="http://connman.net/"
11 WGET_URL="http://linux-kernel.uio.no/pub/linux/network/$PACKAGE/$TARBALL"
13 DEPENDS="glib dbus iptables gnutls libnl libgcrypt udev wpa_supplicant
14 dbus-helper"
15 BUILD_DEPENDS="glib-dev dbus-dev iptables-dev iptables gnutls-dev libnl-dev
16 openconnect udev-dev wpa_supplicant readline-dev ncursesw-dev openvpn
17 bluez-dev ppp-dev"
18 SUGGESTED="xl2tpd pptpclient"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 # add dependency on libncurses.so,
24 sed -i 's/-lreadline/-lreadline -lncurses/' Makefile.in
25 cd $src
26 ./configure \
27 --prefix=/usr \
28 --sysconfdir=/etc \
29 --localstatedir=/var \
30 --infodir=/usr/share/info \
31 --mandir=/usr/share/man \
32 --disable-gtk-doc \
33 --disable-neard \
34 --enable-threads \
35 --enable-polkit \
36 --enable-openconnect \
37 --enable-vpnc \
38 --enable-openvpn \
39 --enable-client \
40 --enable-test \
41 $CONFIGURE_ARGS &&
42 make && make DESTDIR=$DESTDIR install
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 # dbus conf
49 mkdir -p $fs/etc
50 cp -a $install/etc/dbus-1 $fs/etc
51 # conman exec
52 mkdir -p $fs/usr
53 cp -a $install/usr/sbin $fs/usr
54 # libs
55 mkdir -p $fs/usr/lib/connman/plugins-vpn
56 cp -a $install/usr/lib/connman/plugins-vpn/*.so \
57 $fs/usr/lib/connman/plugins-vpn
58 # vpn scripts
59 mkdir -p $fs/usr/lib/connman/scripts
60 cp -a $install/usr/lib/connman/scripts $fs/usr/lib/connman
61 # init script
62 cp -a $stuff/etc $fs
63 }
65 # Pre and post remove commands for Tazpkg
66 post_install()
67 {
68 local root=$1
69 if ! grep -q ^CONNMAND_OPTIONS $root/etc/daemons.conf; then
70 echo '# Connman daemon options.' >> $root/etc/daemons.conf
71 echo 'CONNMAND_OPTIONS=""' >> $root/etc/daemons.conf
72 echo '' >> $root/etc/daemons.conf
73 fi
74 if [ -z "$root" ]; then
75 /etc/init.d/connman start || /etc/init.d/connman restart
76 fi
77 }
79 pre_remove()
80 {
81 if [ -z "$1" ]; then
82 /etc/init.d/connman stop
83 fi
84 }