wok-current annotate vnstat/receipt @ rev 25693
Up depends pkgs for cups, need to rebuild it for ssl 3.0
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sun Mar 24 15:17:37 2024 +0000 (7 months ago) |
parents | 922f061231c2 |
children |
rev | line source |
---|---|
al@18911 | 1 # SliTaz package receipt. |
al@18911 | 2 |
al@18911 | 3 PACKAGE="vnstat" |
Hans-G?nter@25400 | 4 VERSION="2.9" |
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@25400 | 43 cook_copy_folders etc |
Hans-G?nter@25400 | 44 cook_copy_folders bin |
Hans-G?nter@25400 | 45 cook_copy_folders sbin |
al@18911 | 46 } |
al@18938 | 47 |
al@18938 | 48 post_install() |
al@18938 | 49 { |
Hans-G?nter@25400 | 50 # Edit daemons.conf |
Hans-G?nter@22114 | 51 if ! grep -q ^VNSTATD_OPTIONS "$1/etc/daemons.conf" |
Hans-G?nter@22114 | 52 then |
al@18938 | 53 cat >> "$1/etc/daemons.conf" <<EOT |
al@18938 | 54 # vnstat daemon options. |
al@18938 | 55 VNSTATD_OPTIONS="-d -p /var/run/vnstatd.pid" |
al@18938 | 56 |
al@18938 | 57 EOT |
al@18938 | 58 fi |
Hans-G?nter@25400 | 59 |
Hans-G?nter@25400 | 60 # Start vnstat daemon |
Hans-G?nter@25400 | 61 if [ -z "$1" -a ! -s /aufs-umount.sh ] |
Hans-G?nter@25400 | 62 then |
Hans-G?nter@25400 | 63 /etc/init.d/vnstatd start || continue |
Hans-G?nter@25400 | 64 fi |
al@18938 | 65 } |
al@18938 | 66 |
al@18938 | 67 pre_remove() |
al@18938 | 68 { |
Hans-G?nter@22114 | 69 # Stop vnstat daemon before removing files. |
Hans-G?nter@25400 | 70 [ -z "$1" -a -x /etc/init.d/vnstatd ] && |
Hans-G?nter@25400 | 71 /etc/init.d/vnstatd stop |
al@18938 | 72 : |
al@18938 | 73 } |