wok-6.x view ntop/receipt @ rev 10889

Up: ntop* (4.0.3)
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Tue Jul 05 01:19:06 2011 +0200 (2011-07-05)
parents ef7ffda1c22c
children c3f9dd585ee1
line source
1 # SliTaz package receipt.
3 PACKAGE="ntop"
4 VERSION="4.0.3"
5 CATEGORY="network"
6 SHORT_DESC="Network traffic probe."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tgz"
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 BUILD_DEPENDS="zlib-dev openssl-dev libpng-dev libpcap-dev libtool glibc-dev gdbm-dev rrdtool \
16 autoconf automake rrdtool-dev wget geoip-dev "
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 ./autogen.sh --prefix=/usr \
23 --sysconfdir=/etc \
24 --localstatedir=/var $CONFIGURE_ARGS &&
25 make &&
26 make DESTDIR=$PWD/_pkg install
27 #~ && make install-data-as
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p $fs/usr/lib/plugins $fs/usr/share
34 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
35 cp -a $_pkg/usr/lib/ntop $fs/usr/lib
36 cp -a $_pkg/usr/bin $fs/usr
37 cp -a $_pkg/usr/share/ntop $fs/usr/share
38 chown -R 80.80 $fs/usr/share/ntop
39 cp -a $_pkg/usr/bin $fs
40 cp -a $_pkg/etc $fs
41 cp -a $_pkg/var $fs
43 # fix perms for /var/ntop
44 chown nobody.nogroup $fs/var/ntop
46 # Copy startup script and fix perms
47 cp -a stuff/etc $fs
48 chown root.root $fs/etc/init.d/ntop
50 # Package all ntop pkgs
51 for i in $(cd $WOK; ls -d ntop-*)
52 do
53 cook $i
54 done
55 }
57 post_install()
58 {
59 $user=ntop
60 $group=ntop
62 if ! grep -q $user: $1/etc/passwd; then
63 echo -n "Adding user/group $user..."
64 chroot $1/ addgroup -S $user
65 chroot $1/ adduser -S -D -H -G $group $user
66 status
67 fi
69 # Fix perms for files and directories
70 chroot $1/ chown -R ${user}.${group} /var/ntop
72 # Start Nagios daemon if we are on running system
73 [ -z $1 ] && /etc/init.d/$PACKAGE start
75 # post_install messges
76 echo -e "\nTo starts $PACKAGE server you can run :\n"
77 echo "/etc/init.d/$PACKAGE start"
78 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
79 }