wok-current view vnstat/receipt @ rev 21678
updated pgrouting (2.5.2 -> 2.6.2)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Jun 02 10:56:29 2019 +0100 (2019-06-02) |
parents | 8e7ad14f5f88 |
children | 760ac98a2719 |
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="https://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 }