wok annotate vnstat/receipt @ rev 23790
updated youtube-dl (2019.11.05 -> 2020.05.08)
author | Hans-G?nter Theisgen |
---|---|
date | Fri May 22 07:41:14 2020 +0100 (2020-05-22) |
parents | 760ac98a2719 |
children | 922f061231c2 |
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 |
al@18911 | 17 # Rules to configure and make the package. |
al@18911 | 18 compile_rules() |
al@18911 | 19 { |
Hans-G?nter@22114 | 20 ./configure \ |
Hans-G?nter@22114 | 21 --prefix=/usr \ |
Hans-G?nter@22114 | 22 --sysconfdir=/etc \ |
Hans-G?nter@22114 | 23 $CONFIGURE_ARGS && |
Hans-G?nter@22114 | 24 make && |
Hans-G?nter@22114 | 25 make install |
Hans-G?nter@22114 | 26 |
al@18911 | 27 find $install/usr/share/man -type f -exec gzip \{\} \; |
Hans-G?nter@22114 | 28 |
al@18938 | 29 mkdir -p $install/etc/init.d |
al@18938 | 30 ln -s daemon $install/etc/init.d/vnstatd |
al@18911 | 31 } |
al@18911 | 32 |
al@18911 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
al@18911 | 34 genpkg_rules() |
al@18911 | 35 { |
Hans-G?nter@23727 | 36 cp -a $install/* $fs |
al@18911 | 37 } |
al@18938 | 38 |
al@18938 | 39 post_install() |
al@18938 | 40 { |
al@18938 | 41 # Start vnstat daemon and edit daemons.conf |
Hans-G?nter@22114 | 42 if [ -z "$1" -a ! -s /aufs-umount.sh ] |
Hans-G?nter@22114 | 43 then |
al@18938 | 44 /etc/init.d/vnstatd start || continue |
al@18938 | 45 fi |
Hans-G?nter@22114 | 46 |
Hans-G?nter@22114 | 47 if ! grep -q ^VNSTATD_OPTIONS "$1/etc/daemons.conf" |
Hans-G?nter@22114 | 48 then |
al@18938 | 49 cat >> "$1/etc/daemons.conf" <<EOT |
al@18938 | 50 # vnstat daemon options. |
al@18938 | 51 VNSTATD_OPTIONS="-d -p /var/run/vnstatd.pid" |
al@18938 | 52 |
al@18938 | 53 EOT |
al@18938 | 54 fi |
al@18938 | 55 } |
al@18938 | 56 |
al@18938 | 57 pre_remove() |
al@18938 | 58 { |
Hans-G?nter@22114 | 59 # Stop vnstat daemon before removing files. |
al@18938 | 60 [ -z "$1" -a -x /etc/init.d/vnstatd ] && /etc/init.d/vnstatd stop |
al@18938 | 61 : |
al@18938 | 62 } |