wok annotate vnstat/receipt @ rev 19635
Up SliTaz projects: cookutils(867), slitaz-base-files(321), slitaz-boot-scripts(437), slitaz-tools(1009), tazbug(95), tazirc(20), tazlito(448), tazpkg(933).
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Jan 17 17:38:43 2017 +0200 (2017-01-17) |
parents | 7538e867aae7 |
children | 6135577f4d08 |
rev | line source |
---|---|
al@18911 | 1 # SliTaz package receipt. |
al@18911 | 2 |
al@18911 | 3 PACKAGE="vnstat" |
al@18911 | 4 VERSION="1.15" |
al@18911 | 5 CATEGORY="system-tools" |
al@18911 | 6 SHORT_DESC="Console-based network monitoring utility" |
al@18911 | 7 MAINTAINER="al.bobylev@gmail.com" |
al@18911 | 8 LICENSE="GPL2" |
al@18911 | 9 WEB_SITE="http://humdi.net/vnstat/" |
al@18911 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
al@18911 | 11 WGET_URL="${WEB_SITE}$TARBALL" |
al@18911 | 12 |
al@18938 | 13 DEPENDS="busybox" |
al@18911 | 14 SUGGESTED="libgd" |
al@18911 | 15 BUILD_DEPENDS="libgd-dev" |
al@18911 | 16 |
al@18911 | 17 # Rules to configure and make the package. |
al@18911 | 18 compile_rules() |
al@18911 | 19 { |
al@18911 | 20 ./configure \ |
al@18911 | 21 --prefix=/usr \ |
al@18911 | 22 --sysconfdir=/etc \ |
al@18911 | 23 $CONFIGURE_ARGS && |
al@18911 | 24 make && make install |
al@18911 | 25 find $install/usr/share/man -type f -exec gzip \{\} \; |
al@18938 | 26 mkdir -p $install/etc/init.d |
al@18938 | 27 ln -s daemon $install/etc/init.d/vnstatd |
al@18911 | 28 } |
al@18911 | 29 |
al@18911 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
al@18911 | 31 genpkg_rules() |
al@18911 | 32 { |
al@18911 | 33 cp -a $install/* $fs |
al@18911 | 34 } |
al@18938 | 35 |
al@18938 | 36 post_install() |
al@18938 | 37 { |
al@18938 | 38 # Start vnstat daemon and edit daemons.conf |
al@18938 | 39 if [ -z "$1" -a ! -s /aufs-umount.sh ]; then |
al@18938 | 40 /etc/init.d/vnstatd start || continue |
al@18938 | 41 fi |
al@18938 | 42 if ! grep -q ^VNSTATD_OPTIONS "$1/etc/daemons.conf"; then |
al@18938 | 43 cat >> "$1/etc/daemons.conf" <<EOT |
al@18938 | 44 # vnstat daemon options. |
al@18938 | 45 VNSTATD_OPTIONS="-d -p /var/run/vnstatd.pid" |
al@18938 | 46 |
al@18938 | 47 EOT |
al@18938 | 48 fi |
al@18938 | 49 } |
al@18938 | 50 |
al@18938 | 51 pre_remove() |
al@18938 | 52 { |
al@18938 | 53 # Stop vnstat daemon before rm. |
al@18938 | 54 [ -z "$1" -a -x /etc/init.d/vnstatd ] && /etc/init.d/vnstatd stop |
al@18938 | 55 : |
al@18938 | 56 } |