wok-current annotate 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 |
rev | line source |
---|---|
erjo@1463 | 1 # SliTaz package receipt. |
erjo@1463 | 2 |
erjo@1463 | 3 PACKAGE="ntop" |
erjo@10889 | 4 VERSION="4.0.3" |
erjo@1463 | 5 CATEGORY="network" |
erjo@1463 | 6 SHORT_DESC="Network traffic probe." |
erjo@1463 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
erjo@10889 | 8 TARBALL="$PACKAGE-$VERSION.tgz" |
erjo@1463 | 9 WEB_SITE="http://www.ntop.org/" |
erjo@1463 | 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
erjo@1463 | 11 CONFIG_FILES="/etc/ntop" |
jozee@4969 | 12 TAGS="network" |
erjo@1463 | 13 |
erjo@10889 | 14 DEPENDS="zlib openssl libpng libpcap glibc gdbm rrdtool perl pcre geoip" |
erjo@10889 | 15 BUILD_DEPENDS="zlib-dev openssl-dev libpng-dev libpcap-dev libtool glibc-dev gdbm-dev rrdtool \ |
erjo@10889 | 16 autoconf automake rrdtool-dev wget geoip-dev " |
erjo@10889 | 17 |
erjo@1463 | 18 # Rules to configure and make the package. |
erjo@1463 | 19 compile_rules() |
erjo@1463 | 20 { |
erjo@1463 | 21 cd $src |
erjo@10889 | 22 ./autogen.sh --prefix=/usr \ |
erjo@10889 | 23 --sysconfdir=/etc \ |
erjo@10889 | 24 --localstatedir=/var $CONFIGURE_ARGS && |
erjo@1463 | 25 make && |
erjo@10889 | 26 make DESTDIR=$PWD/_pkg install |
erjo@10889 | 27 #~ && make install-data-as |
erjo@1463 | 28 } |
erjo@1463 | 29 |
erjo@1463 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@1463 | 31 genpkg_rules() |
erjo@1463 | 32 { |
erjo@1463 | 33 mkdir -p $fs/usr/lib/plugins $fs/usr/share |
erjo@1463 | 34 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
erjo@1463 | 35 cp -a $_pkg/usr/lib/ntop $fs/usr/lib |
erjo@1463 | 36 cp -a $_pkg/usr/bin $fs/usr |
erjo@1463 | 37 cp -a $_pkg/usr/share/ntop $fs/usr/share |
erjo@1463 | 38 chown -R 80.80 $fs/usr/share/ntop |
erjo@1463 | 39 cp -a $_pkg/usr/bin $fs |
erjo@1463 | 40 cp -a $_pkg/etc $fs |
erjo@1463 | 41 cp -a $_pkg/var $fs |
erjo@1463 | 42 |
erjo@1463 | 43 # fix perms for /var/ntop |
erjo@1463 | 44 chown nobody.nogroup $fs/var/ntop |
erjo@1463 | 45 |
erjo@1463 | 46 # Copy startup script and fix perms |
erjo@1463 | 47 cp -a stuff/etc $fs |
erjo@1463 | 48 chown root.root $fs/etc/init.d/ntop |
erjo@10889 | 49 |
erjo@1463 | 50 # Package all ntop pkgs |
erjo@1463 | 51 for i in $(cd $WOK; ls -d ntop-*) |
erjo@1463 | 52 do |
erjo@10889 | 53 cook $i |
erjo@1463 | 54 done |
erjo@1463 | 55 } |
erjo@1463 | 56 |
erjo@10889 | 57 post_install() |
erjo@10889 | 58 { |
erjo@10889 | 59 $user=ntop |
erjo@10889 | 60 $group=ntop |
erjo@10889 | 61 |
erjo@10889 | 62 if ! grep -q $user: $1/etc/passwd; then |
erjo@10889 | 63 echo -n "Adding user/group $user..." |
erjo@10889 | 64 chroot $1/ addgroup -S $user |
erjo@10889 | 65 chroot $1/ adduser -S -D -H -G $group $user |
erjo@10889 | 66 status |
erjo@10889 | 67 fi |
erjo@10889 | 68 |
erjo@10889 | 69 # Fix perms for files and directories |
erjo@10889 | 70 chroot $1/ chown -R ${user}.${group} /var/ntop |
erjo@10889 | 71 |
erjo@10889 | 72 # Start Nagios daemon if we are on running system |
erjo@10889 | 73 [ -z $1 ] && /etc/init.d/$PACKAGE start |
erjo@10889 | 74 |
erjo@10889 | 75 # post_install messges |
erjo@10889 | 76 echo -e "\nTo starts $PACKAGE server you can run :\n" |
erjo@10889 | 77 echo "/etc/init.d/$PACKAGE start" |
erjo@10889 | 78 echo -e "Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf\n" |
erjo@10889 | 79 } |
erjo@10888 | 80 |
erjo@10889 | 81 |
erjo@10889 | 82 |