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