wok-current view vnstat/receipt @ rev 19526

gambas2, atril: update (b)depends
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Mon Nov 28 15:23:07 2016 +0100 (2016-11-28)
parents 7538e867aae7
children 6135577f4d08
line source
1 # SliTaz package receipt.
3 PACKAGE="vnstat"
4 VERSION="1.15"
5 CATEGORY="system-tools"
6 SHORT_DESC="Console-based network monitoring utility"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="GPL2"
9 WEB_SITE="http://humdi.net/vnstat/"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WGET_URL="${WEB_SITE}$TARBALL"
13 DEPENDS="busybox"
14 SUGGESTED="libgd"
15 BUILD_DEPENDS="libgd-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 ./configure \
21 --prefix=/usr \
22 --sysconfdir=/etc \
23 $CONFIGURE_ARGS &&
24 make && make install
25 find $install/usr/share/man -type f -exec gzip \{\} \;
26 mkdir -p $install/etc/init.d
27 ln -s daemon $install/etc/init.d/vnstatd
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 cp -a $install/* $fs
34 }
36 post_install()
37 {
38 # Start vnstat daemon and edit daemons.conf
39 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then
40 /etc/init.d/vnstatd start || continue
41 fi
42 if ! grep -q ^VNSTATD_OPTIONS "$1/etc/daemons.conf"; then
43 cat >> "$1/etc/daemons.conf" <<EOT
44 # vnstat daemon options.
45 VNSTATD_OPTIONS="-d -p /var/run/vnstatd.pid"
47 EOT
48 fi
49 }
51 pre_remove()
52 {
53 # Stop vnstat daemon before rm.
54 [ -z "$1" -a -x /etc/init.d/vnstatd ] && /etc/init.d/vnstatd stop
55 :
56 }