wok-next view ntop/receipt @ rev 20674
Up putty (0.70)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat May 12 05:17:48 2018 +0300 (2018-05-12) |
parents | d43bf7aae921 |
children | 642c924029f7 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="ntop"
4 VERSION="4.1.0"
5 CATEGORY="network"
6 SHORT_DESC="Network traffic probe"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://www.ntop.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 BUILD_DEPENDS="zlib-dev openssl-dev libpng16-dev libpcap-dev libtool \
15 glibc-dev gdbm-dev rrdtool autoconf automake rrdtool-dev geoip-dev \
16 libwrap libtool"
17 SPLIT="ntop-dev ntop-man"
19 compile_rules() {
20 ./autogen.sh \
21 --localstatedir=/var/lib \
22 $CONFIGURE_ARGS &&
23 make &&
24 make install || return 1
26 #~ && make install-data-as
28 chown -R www.www $install/usr/share/ntop/
29 install -Dm755 $stuff/ntop $install/etc/init.d/ntop
30 mkdir -p $install/var/log/ntop/
31 }
33 genpkg_rules() {
34 case $PACKAGE in
35 ntop)
36 copy @std
37 CONFIG_FILES="/etc/ntop/"
38 DEPENDS="zlib openssl libpng16 libpcap glibc gdbm rrdtool perl \
39 pcre geoip libwrap"
40 TAGS="network"
41 ;;
42 ntop-dev)
43 copy @dev
44 ;;
45 ntop-man)
46 CAT="development|man page"
47 copy usr/share/man/
48 ;;
49 esac
50 }
52 post_install_ntop() {
53 user=ntop
54 group=ntop
56 if ! grep -q $user: "$1/etc/passwd"; then
57 chroot "$1/" addgroup -S $user
58 chroot "$1/" adduser -S -D -H -G $group $user
59 fi
61 # Fix perms for files and directories
62 chroot "$1/" chown -R $user.$group /var/lib/ntop /var/log/ntop
64 # Start package daemon if we are on running system
65 [ "$1" ] || /etc/init.d/$PACKAGE start
67 # post_install message
68 [ -n "$quiet" ] || cat <<EOT
70 .---------------------------------------------.
71 | To start ntop server you can run: |
72 | /etc/init.d/ntop start |
73 | |
74 | Or add ntop to RUN_DAEMONS in /etc/rcS.conf |
75 '---------------------------------------------'
76 EOT
77 }
79 pre_remove_ntop() {
80 [ "$1" ] || /etc/init.d/$PACKAGE stop
81 }
83 post_remove_ntop() {
84 user=ntop
85 group=ntop
87 if ! grep -q $user: "$1/etc/passwd"; then
88 chroot "$1/" delgroup $user
89 chroot "$1/" deluser $user
90 fi
91 }