# HG changeset patch # User Eric Joseph-Alexandre # Date 1223109621 -7200 # Node ID 3b5f5f0ff01e11c1eb5405bd3554bdc2f1aabcbf # Parent c26d98c9bc75af0bbbf3f652bb3c00b18b8e59c6 Add: ntop, ,top-dev, ntop-man diff -r c26d98c9bc75 -r 3b5f5f0ff01e ntop-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntop-dev/receipt Sat Oct 04 10:40:21 2008 +0200 @@ -0,0 +1,17 @@ +# SliTaz package receipt. + +PACKAGE="ntop-dev" +VERSION="3.3.7" +CATEGORY="development" +SHORT_DESC="Network traffic probe development files." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.ntop.org/" +WANTED="ntop" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib + cp -a $_pkg/usr/lib/*.a $fs/usr/lib +} + diff -r c26d98c9bc75 -r 3b5f5f0ff01e ntop-man/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntop-man/receipt Sat Oct 04 10:40:21 2008 +0200 @@ -0,0 +1,17 @@ +# SliTaz package receipt. + +PACKAGE="ntop-man" +VERSION="3.3.7" +CATEGORY="development" +SHORT_DESC="Network traffic probe man page." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.ntop.org/" +WANTED="ntop" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $_pkg/usr/share + cp -a $_pkg/usr/share/man $fs/share +} + diff -r c26d98c9bc75 -r 3b5f5f0ff01e ntop/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntop/receipt Sat Oct 04 10:40:21 2008 +0200 @@ -0,0 +1,52 @@ +# SliTaz package receipt. + +PACKAGE="ntop" +VERSION="3.3.7" +CATEGORY="network" +SHORT_DESC="Network traffic probe." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.ntop.org/" +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" +DEPENDS="zlib openssl libpng libpcap glibc gdbm rrdtool perl" +BUILD_DEPENDS="zlib-dev openssl-dev libpng-dev libpcap libtool glibc-dev gdbm-dev rrdtool autoconf automake rrdtool-dev" +CONFIG_FILES="/etc/ntop" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./autogen.sh --prefix=/usr --infodir=/usr/share/info \ + --sysconfdir=/etc --localstatedir=/var \ + --mandir=/usr/share/man $CONFIGURE_ARGS && + make && + make DESTDIR=$PWD/_pkg install install-data-as +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib/plugins $fs/usr/share + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib + cp -a $_pkg/usr/lib/ntop $fs/usr/lib + cp -a $_pkg/usr/bin $fs/usr + cp -a $_pkg/usr/share/ntop $fs/usr/share + chown -R 80.80 $fs/usr/share/ntop + cp -a $_pkg/usr/bin $fs + cp -a $_pkg/etc $fs + cp -a $_pkg/var $fs + + # fix perms for /var/ntop + chown nobody.nogroup $fs/var/ntop + + # Copy startup script and fix perms + cp -a stuff/etc $fs + chown root.root $fs/etc/init.d/ntop + + # Package all ntop pkgs + for i in $(cd $WOK; ls -d ntop-*) + do + tazwok genpkg $i + done +} + diff -r c26d98c9bc75 -r 3b5f5f0ff01e ntop/stuff/etc/init.d/ntop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntop/stuff/etc/init.d/ntop Sat Oct 04 10:40:21 2008 +0200 @@ -0,0 +1,62 @@ +#!/bin/sh +# /etc/init.d/ntop : Start, stop and restart ntop daemon on SliTaz, at +# boot time or with the command line. +# +# To start SSH server at boot time, just put ntop in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf +# +. /etc/init.d/rc.functions + + +NAME=ntop +DESC="ntop server" +DAEMON=/usr/bin/ntop + +HTTP_PORT="3000" + +OPTIONS="-w HTTP_PORT -d" +PIDFILE=/var/run/ntop.pid + +case "$1" in + start) + if [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + # We need to set ntop admin password. + if [ ! -f /var/ntop/ntop_pw.db ] ; then + ntop -A || exit + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` && rm -f $PIDFILE + status + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` && rm -f $PIDFILE + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0