wok-6.x view ntop/receipt @ rev 16049
s/i468/i486/
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 10 12:39:12 2014 +0000 (2014-03-10) |
parents | 2b9f96603415 |
children | 9689f1b75619 |
line source
1 # SliTaz package receipt.
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 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.ntop.org/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 CONFIG_FILES="/etc/ntop"
13 TAGS="network"
15 DEPENDS="zlib openssl libpng libpcap glibc gdbm rrdtool perl pcre geoip\
16 libwrap"
17 BUILD_DEPENDS="zlib-dev openssl-dev libpng-dev libpcap-dev libtool \
18 glibc-dev gdbm-dev rrdtool autoconf automake rrdtool-dev wget geoip-dev \
19 libwrap libtool"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 cd $src
25 ./autogen.sh --prefix=/usr \
26 --sysconfdir=/etc \
27 --localstatedir=/var/lib \
28 $CONFIGURE_ARGS 2>&1 | grep -v 'grep: libtool:' &&
29 make && make install
30 #~ && make install-data-as
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir -p $fs/usr/lib/plugins \
37 $fs/usr/share \
38 $fs/var/log/ntop
40 cp -a $install/usr/lib/*.so* $fs/usr/lib
41 cp -a $install/usr/lib/ntop $fs/usr/lib
42 cp -a $install/usr/bin $fs/usr
43 cp -a $install/usr/share/ntop $fs/usr/share
44 chown -R www.www $fs/usr/share/ntop
45 cp -a $install/usr/bin $fs
46 cp -a $install/etc $fs
47 cp -a $install/var $fs
49 # Copy startup script and fix perms
50 cp -a stuff/etc $fs
51 chown root.root $fs/etc/init.d/ntop
52 }
54 post_install()
55 {
56 user=ntop
57 group=ntop
59 if ! grep -q $user: $1/etc/passwd; then
60 echo -n "Adding user/group $user..."
61 chroot $1/ addgroup -S $user
62 chroot $1/ adduser -S -D -H -G $group $user
63 status
64 fi
66 # Fix perms for files and directories
67 chroot $1/ chown -R ${user}.${group} /var/lib/ntop /var/log/ntop
69 # Start package daemon if we are on running system
70 [ -z $1 ] && /etc/init.d/$PACKAGE start
72 # post_install messges
73 echo -e "\nTo starts $PACKAGE server you can run :\n"
74 echo "/etc/init.d/$PACKAGE start"
75 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
76 }
78 pre_remove()
79 {
80 [ -z $1 ] && /etc/init.d/$PACKAGE stop
81 }
83 post_remove()
84 {
85 user=ntop
86 group=ntop
88 if ! grep -q $user: $1/etc/passwd; then
89 echo -n "Removing user/group $user..."
90 chroot $1/ delgroup $user
91 chroot $1/ deluser $user
92 status
93 fi
94 }