wok-6.x view vnstat/receipt @ rev 20279
8086tiny: fix DAA/DAS/shift opcodes
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 23 13:08:29 2018 +0100 (2018-03-23) |
parents | 7538e867aae7 |
children | 6135577f4d08 |
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="http://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 }