wok-next view vnstat/receipt @ rev 20636
Fix "can't execute '/usr/bin/update-mime-database': No such file or directory"
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Apr 27 15:12:17 2018 +0300 (2018-04-27) |
parents | 8e7ad14f5f88 |
children | 7506b35e1c6f |
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="http://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 }