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