wok-current view ntop/receipt @ rev 11930

dosbox cleaned up desktop file
author Samuel Trassare <samuel_trassare@yahoo.com>
date Wed Feb 29 16:29:20 2012 -0800 (2012-02-29)
parents 53e9551e9325
children 38169ce50380
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 BUILD_DEPENDS="zlib-dev openssl-dev libpng-dev libpcap-dev libtool glibc-dev gdbm-dev rrdtool \
16 autoconf automake rrdtool-dev wget geoip-dev libwrap"
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/lib $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 \
34 $fs/usr/share \
35 $fs/var/log/ntop
37 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
38 cp -a $_pkg/usr/lib/ntop $fs/usr/lib
39 cp -a $_pkg/usr/bin $fs/usr
40 cp -a $_pkg/usr/share/ntop $fs/usr/share
41 chown -R www.www $fs/usr/share/ntop
42 cp -a $_pkg/usr/bin $fs
43 cp -a $_pkg/etc $fs
44 cp -a $_pkg/var $fs
46 # Copy startup script and fix perms
47 cp -a stuff/etc $fs
48 chown root.root $fs/etc/init.d/ntop
49 }
51 post_install()
52 {
53 user=ntop
54 group=ntop
56 if ! grep -q $user: $1/etc/passwd; then
57 echo -n "Adding user/group $user..."
58 chroot $1/ addgroup -S $user
59 chroot $1/ adduser -S -D -H -G $group $user
60 status
61 fi
63 # Fix perms for files and directories
64 chroot $1/ chown -R ${user}.${group} /var/lib/ntop /var/log/ntop
66 # Start package daemon if we are on running system
67 [ -z $1 ] && /etc/init.d/$PACKAGE start
69 # post_install messges
70 echo -e "\nTo starts $PACKAGE server you can run :\n"
71 echo "/etc/init.d/$PACKAGE start"
72 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
73 }
75 pre_remove()
76 {
77 [ -z $1 ] && /etc/init.d/$PACKAGE stop
78 }
80 post_remove()
81 {
82 user=ntop
83 group=ntop
85 if ! grep -q $user: $1/etc/passwd; then
86 echo -n "Removing user/group $user..."
87 chroot $1/ delgroup $user
88 chroot $1/ deluser $user
89 status
90 fi
91 }