wok view vnstat/receipt @ rev 23395

updated perl-test-deep (0.106 -> 1.130)
author Hans-G?nter Theisgen
date Tue Mar 31 17:09:45 2020 +0100 (2020-03-31)
parents 6135577f4d08
children 1c8bb7fdb913
line source
1 # SliTaz package receipt.
3 PACKAGE="vnstat"
4 VERSION="2.4"
5 CATEGORY="system-tools"
6 SHORT_DESC="Console-based network monitoring utility."
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="GPL2"
9 WEB_SITE="https://humdi.net/vnstat/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}$TARBALL"
14 SUGGESTED="libgd"
15 BUILD_DEPENDS="libgd-dev sqlite-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 &&
25 make install
27 find $install/usr/share/man -type f -exec gzip \{\} \;
29 mkdir -p $install/etc/init.d
30 ln -s daemon $install/etc/init.d/vnstatd
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 cp -a $install/* $fs
37 }
39 post_install()
40 {
41 # Start vnstat daemon and edit daemons.conf
42 if [ -z "$1" -a ! -s /aufs-umount.sh ]
43 then
44 /etc/init.d/vnstatd start || continue
45 fi
47 if ! grep -q ^VNSTATD_OPTIONS "$1/etc/daemons.conf"
48 then
49 cat >> "$1/etc/daemons.conf" <<EOT
50 # vnstat daemon options.
51 VNSTATD_OPTIONS="-d -p /var/run/vnstatd.pid"
53 EOT
54 fi
55 }
57 pre_remove()
58 {
59 # Stop vnstat daemon before removing files.
60 [ -z "$1" -a -x /etc/init.d/vnstatd ] && /etc/init.d/vnstatd stop
61 :
62 }