wok view vnstat/receipt @ rev 24143

Add ventoy
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 16 17:16:48 2021 +0000 (2021-11-16)
parents 760ac98a2719
children 922f061231c2
line source
1 # SliTaz package receipt.
3 PACKAGE="vnstat"
4 VERSION="2.6"
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 }