wok-6.x annotate vnstat/receipt @ rev 25119

updated peazip (6.8.0 -> 8.4.0)
author Hans-G?nter Theisgen
date Sun Jun 26 09:56:47 2022 +0100 (2022-06-26)
parents 1c8bb7fdb913
children 8ad223a975fa
rev   line source
al@18911 1 # SliTaz package receipt.
al@18911 2
al@18911 3 PACKAGE="vnstat"
Hans-G?nter@23727 4 VERSION="2.6"
al@18911 5 CATEGORY="system-tools"
Hans-G?nter@22114 6 SHORT_DESC="Console-based network monitoring utility."
al@18911 7 MAINTAINER="al.bobylev@gmail.com"
al@18911 8 LICENSE="GPL2"
pascal@20679 9 WEB_SITE="https://humdi.net/vnstat/"
Hans-G?nter@22114 10
al@18911 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@18911 12 WGET_URL="${WEB_SITE}$TARBALL"
al@18911 13
al@18911 14 SUGGESTED="libgd"
Hans-G?nter@22114 15 BUILD_DEPENDS="libgd-dev sqlite-dev"
al@18911 16
pascal@24304 17 # What is the latest version available today?
pascal@24304 18 current_version()
pascal@24304 19 {
pascal@24304 20 wget -O - $WEB_SITE 2>/dev/null | \
pascal@24304 21 sed "/$PACKAGE-/!d;s|.*$PACKAGE-||;s|.tar.*||;q"
pascal@24304 22 }
pascal@24304 23
al@18911 24 # Rules to configure and make the package.
al@18911 25 compile_rules()
al@18911 26 {
Hans-G?nter@22114 27 ./configure \
Hans-G?nter@22114 28 --prefix=/usr \
Hans-G?nter@22114 29 --sysconfdir=/etc \
Hans-G?nter@22114 30 $CONFIGURE_ARGS &&
Hans-G?nter@22114 31 make &&
Hans-G?nter@22114 32 make install
Hans-G?nter@22114 33
al@18911 34 find $install/usr/share/man -type f -exec gzip \{\} \;
Hans-G?nter@22114 35
al@18938 36 mkdir -p $install/etc/init.d
al@18938 37 ln -s daemon $install/etc/init.d/vnstatd
al@18911 38 }
al@18911 39
al@18911 40 # Rules to gen a SliTaz package suitable for Tazpkg.
al@18911 41 genpkg_rules()
al@18911 42 {
Hans-G?nter@23727 43 cp -a $install/* $fs
al@18911 44 }
al@18938 45
al@18938 46 post_install()
al@18938 47 {
al@18938 48 # Start vnstat daemon and edit daemons.conf
Hans-G?nter@22114 49 if [ -z "$1" -a ! -s /aufs-umount.sh ]
Hans-G?nter@22114 50 then
al@18938 51 /etc/init.d/vnstatd start || continue
al@18938 52 fi
Hans-G?nter@22114 53
Hans-G?nter@22114 54 if ! grep -q ^VNSTATD_OPTIONS "$1/etc/daemons.conf"
Hans-G?nter@22114 55 then
al@18938 56 cat >> "$1/etc/daemons.conf" <<EOT
al@18938 57 # vnstat daemon options.
al@18938 58 VNSTATD_OPTIONS="-d -p /var/run/vnstatd.pid"
al@18938 59
al@18938 60 EOT
al@18938 61 fi
al@18938 62 }
al@18938 63
al@18938 64 pre_remove()
al@18938 65 {
Hans-G?nter@22114 66 # Stop vnstat daemon before removing files.
al@18938 67 [ -z "$1" -a -x /etc/init.d/vnstatd ] && /etc/init.d/vnstatd stop
al@18938 68 :
al@18938 69 }