wok-next view vnstat/receipt @ rev 21379
updated mspdebug (0.17 -> 0.25)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Apr 16 16:31:49 2020 +0100 (2020-04-16) |
parents | 757d032c55c7 |
children |
line source
1 # SliTaz package receipt v2.
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="https://humdi.net/vnstat/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}$TARBALL"
14 BUILD_DEPENDS="libgd-dev"
16 compile_rules() {
17 ./configure $CONFIGURE_ARGS &&
18 make &&
19 make install || return 1
21 mkdir -p $install/etc/init.d
22 ln -s daemon $install/etc/init.d/vnstatd
23 }
25 genpkg_rules() {
26 copy @std
27 DEPENDS="busybox"
28 SUGGESTED="libgd"
29 }
31 post_install() {
32 # Start vnstat daemon and edit daemons.conf
33 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then
34 /etc/init.d/vnstatd start || continue
35 fi
36 if ! grep -q ^VNSTATD_OPTIONS "$1/etc/daemons.conf"; then
37 cat >> "$1/etc/daemons.conf" <<EOT
38 # vnstat daemon options.
39 VNSTATD_OPTIONS="-d -p /var/run/vnstatd.pid"
41 EOT
42 fi
43 }
45 # Stop vnstat daemon before rm.
46 pre_remove() {
47 [ -z "$1" -a -x /etc/init.d/vnstatd ] && /etc/init.d/vnstatd stop
48 :
49 }