wok 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
files ntop-dev/receipt ntop-man/receipt ntop/receipt
line diff
     1.1 --- a/ntop-dev/receipt	Mon Jul 04 22:49:16 2011 +0200
     1.2 +++ b/ntop-dev/receipt	Tue Jul 05 01:19:06 2011 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="ntop-dev"
     1.7 -VERSION="3.3.7"
     1.8 +VERSION="4.0.3"
     1.9  CATEGORY="development"
    1.10  SHORT_DESC="Network traffic probe development files."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
     2.1 --- a/ntop-man/receipt	Mon Jul 04 22:49:16 2011 +0200
     2.2 +++ b/ntop-man/receipt	Tue Jul 05 01:19:06 2011 +0200
     2.3 @@ -1,7 +1,7 @@
     2.4  # SliTaz package receipt.
     2.5  
     2.6  PACKAGE="ntop-man"
     2.7 -VERSION="3.3.7"
     2.8 +VERSION="4.0.3"
     2.9  CATEGORY="development"
    2.10  SHORT_DESC="Network traffic probe man page."
    2.11  MAINTAINER="pascal.bellard@slitaz.org"
     3.1 --- a/ntop/receipt	Mon Jul 04 22:49:16 2011 +0200
     3.2 +++ b/ntop/receipt	Tue Jul 05 01:19:06 2011 +0200
     3.3 @@ -1,27 +1,30 @@
     3.4  # SliTaz package receipt.
     3.5  
     3.6  PACKAGE="ntop"
     3.7 -VERSION="3.3.7"
     3.8 +VERSION="4.0.3"
     3.9  CATEGORY="network"
    3.10  SHORT_DESC="Network traffic probe."
    3.11  MAINTAINER="pascal.bellard@slitaz.org"
    3.12 -TARBALL="$PACKAGE-$VERSION.tar.gz"
    3.13 +TARBALL="$PACKAGE-$VERSION.tgz"
    3.14  WEB_SITE="http://www.ntop.org/"
    3.15  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    3.16 -DEPENDS="zlib openssl libpng libpcap glibc gdbm rrdtool perl pcre"
    3.17 -BUILD_DEPENDS="zlib-dev openssl-dev libpng-dev libpcap-dev libtool glibc-dev gdbm-dev rrdtool autoconf automake rrdtool-dev"
    3.18  CONFIG_FILES="/etc/ntop"
    3.19  TAGS="network"
    3.20  
    3.21 +DEPENDS="zlib openssl libpng libpcap glibc gdbm rrdtool perl pcre geoip"
    3.22 +BUILD_DEPENDS="zlib-dev openssl-dev libpng-dev libpcap-dev libtool glibc-dev gdbm-dev rrdtool \
    3.23 + autoconf automake rrdtool-dev wget geoip-dev "
    3.24 +
    3.25  # Rules to configure and make the package.
    3.26  compile_rules()
    3.27  {
    3.28  	cd $src
    3.29 -	./autogen.sh --prefix=/usr --infodir=/usr/share/info \
    3.30 -	--sysconfdir=/etc --localstatedir=/var \
    3.31 -	--mandir=/usr/share/man $CONFIGURE_ARGS &&
    3.32 +	./autogen.sh --prefix=/usr	\
    3.33 +		--sysconfdir=/etc \
    3.34 +		--localstatedir=/var $CONFIGURE_ARGS &&
    3.35  	make &&
    3.36 -	make DESTDIR=$PWD/_pkg install install-data-as
    3.37 +make DESTDIR=$PWD/_pkg install 
    3.38 +#~ && make install-data-as
    3.39  }
    3.40  
    3.41  # Rules to gen a SliTaz package suitable for Tazpkg.
    3.42 @@ -43,12 +46,37 @@
    3.43  	# Copy startup script and fix perms
    3.44  	cp -a stuff/etc $fs
    3.45  	chown root.root $fs/etc/init.d/ntop
    3.46 -	
    3.47 +
    3.48  	# Package all ntop pkgs
    3.49  	for i in $(cd $WOK; ls -d ntop-*)
    3.50  	do
    3.51 -		tazwok genpkg $i
    3.52 +		cook $i
    3.53  	done
    3.54  }
    3.55  
    3.56 +post_install()
    3.57 +{
    3.58 +	$user=ntop
    3.59 +	$group=ntop
    3.60 +	
    3.61 +	if ! grep -q $user: $1/etc/passwd; then
    3.62 +		echo -n "Adding user/group $user..."
    3.63 +		chroot $1/ addgroup -S $user
    3.64 +		chroot $1/ adduser -S -D -H -G $group $user
    3.65 +		status
    3.66 +	fi
    3.67 +	
    3.68 +	# Fix perms for files and directories
    3.69 +	chroot $1/ chown -R ${user}.${group} /var/ntop 
    3.70 +		
    3.71 +	# Start Nagios daemon if we are  on running system
    3.72 +	[ -z $1 ] && /etc/init.d/$PACKAGE start
    3.73 +	
    3.74 +	# post_install messges
    3.75 +	echo -e "\nTo starts $PACKAGE server you can run :\n"
    3.76 +	echo "/etc/init.d/$PACKAGE start"
    3.77 +	echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n"
    3.78 +}
    3.79  
    3.80 +
    3.81 +