wok-next view ntop/receipt @ rev 21303
updated gujin (2.8.6 -> 2.8.7)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Dec 10 07:57:29 2019 +0100 (2019-12-10) |
parents | 0ed3f456a542 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="ntop"
4 VERSION="5.0.1"
5 CATEGORY="network"
6 SHORT_DESC="Network traffic probe"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://www.ntop.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 TARBALL_SHA1="bbb8de893b1d0bb3c20785445ff62c7dbf398d0b"
15 BUILD_DEPENDS="libtool automake autoconf wget subversion libpcap-dev gdbm-dev \
16 pcre-dev rrdtool-dev openssl-dev zlib-dev python-dev geoip-dev"
17 SPLIT="$PACKAGE-dev"
19 CONFIG_FILES_std="/etc/ntop/"
20 DEPENDS_std="gdbm geoip libpcap openssl python rrdtool zlib" # ? libpng perl pcre libwrap
21 TAGS_std="network"
23 COOKOPTS="skip-log-errors"
25 compile_rules() {
26 # config nDPI
27 cd nDPI
28 ./configure --with-pic $CONFIGURE_ARGS
29 cd ..
31 export DISTRO="SliTaz"
32 export DISTRO_VERSION="Next"
33 ./autogen.sh \
34 --disable-snmp \
35 $CONFIGURE_ARGS &&
36 fix libtool &&
37 make &&
38 make install-recursive || return 1
40 mkdir -p $install/var/lib/ntop $install/var/lib/ntop/rrd
42 for i in $install/usr/lib/ntop/plugins/*.so; do
43 cmp -s "../../lib$(basename $i)" $i &&
44 ln -sf "../../lib$(basename $i)" $i
45 done
47 install -Dm755 $stuff/ntop $install/etc/init.d/ntop
48 install -Dm644 $stuff/ntop.conf $install/etc/daemons.conf.d/ntop.conf
50 mkdir -p $install/var/log/ntop/
51 chown -R root:root $install
52 find $install -type f -exec chmod g-w '{}' \; # 664->644, 775->755
53 }
55 post_install_ntop() {
56 user=ntop
57 group=ntop
59 if ! grep -q $user: "$1/etc/passwd"; then
60 chroot "$1/" addgroup -S $user
61 chroot "$1/" adduser -S -D -H -G $group $user
62 fi
64 # Fix perms for files and directories
65 chroot "$1/" chown -R $user.$group /var/lib/ntop /var/log/ntop
67 # Start package daemon if we are on running system
68 [ "$1" ] || /etc/init.d/ntop start
70 # post_install message
71 [ -n "$quiet" ] || cat <<EOT
73 .---------------------------------------------.
74 | To start ntop server you can run: |
75 | /etc/init.d/ntop start |
76 | |
77 | Or add ntop to RUN_DAEMONS in /etc/rcS.conf |
78 '---------------------------------------------'
79 EOT
80 }
82 pre_remove_ntop() {
83 [ "$1" ] || /etc/init.d/ntop stop
84 }
86 post_remove_ntop() {
87 user=ntop
88 group=ntop
90 if ! grep -q $user: "$1/etc/passwd"; then
91 chroot "$1/" delgroup $user
92 chroot "$1/" deluser $user
93 fi
94 }