wok view vnstat/receipt @ rev 25262
updated rclone (1.51.0 -> 1.59.0)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Jul 15 08:42:33 2022 +0100 (2022-07-15) |
parents | 1c8bb7fdb913 |
children | 8ad223a975fa |
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 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - $WEB_SITE 2>/dev/null | \
21 sed "/$PACKAGE-/!d;s|.*$PACKAGE-||;s|.tar.*||;q"
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 ./configure \
28 --prefix=/usr \
29 --sysconfdir=/etc \
30 $CONFIGURE_ARGS &&
31 make &&
32 make install
34 find $install/usr/share/man -type f -exec gzip \{\} \;
36 mkdir -p $install/etc/init.d
37 ln -s daemon $install/etc/init.d/vnstatd
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 cp -a $install/* $fs
44 }
46 post_install()
47 {
48 # Start vnstat daemon and edit daemons.conf
49 if [ -z "$1" -a ! -s /aufs-umount.sh ]
50 then
51 /etc/init.d/vnstatd start || continue
52 fi
54 if ! grep -q ^VNSTATD_OPTIONS "$1/etc/daemons.conf"
55 then
56 cat >> "$1/etc/daemons.conf" <<EOT
57 # vnstat daemon options.
58 VNSTATD_OPTIONS="-d -p /var/run/vnstatd.pid"
60 EOT
61 fi
62 }
64 pre_remove()
65 {
66 # Stop vnstat daemon before removing files.
67 [ -z "$1" -a -x /etc/init.d/vnstatd ] && /etc/init.d/vnstatd stop
68 :
69 }