diff options
author | mnag <mnag@FreeBSD.org> | 2006-03-23 03:25:52 +0800 |
---|---|---|
committer | mnag <mnag@FreeBSD.org> | 2006-03-23 03:25:52 +0800 |
commit | dcaa324c6094914729575fad9179040e193155ea (patch) | |
tree | db411bd429ee420d3002914f9621e4402ab34036 | |
parent | 3bdf6c760acbbf613e49f42b6122735982e52b4c (diff) | |
download | freebsd-ports-gnome-dcaa324c6094914729575fad9179040e193155ea.tar.gz freebsd-ports-gnome-dcaa324c6094914729575fad9179040e193155ea.tar.zst freebsd-ports-gnome-dcaa324c6094914729575fad9179040e193155ea.zip |
- Add libxml2 dependency [1]
- Bump PORTREVISION [1]
- Remove IS_INTERACTIVE and admin password creation from installation and put admin password check in rc.d script
- Add OPTIONS to install AS data [2]
- portlint(1)
PR: 94672 [1], 94809 [2]
Submitted by: maintainer
Notified by: Andy Wettstein [1]
-rw-r--r-- | net/ntop/Makefile | 36 | ||||
-rw-r--r-- | net/ntop/files/ntop.sh.in | 26 | ||||
-rw-r--r-- | net/ntop/files/pkg-deinstall.in | 23 | ||||
-rw-r--r-- | net/ntop/pkg-deinstall | 23 | ||||
-rw-r--r-- | net/ntop/pkg-descr | 7 | ||||
-rw-r--r-- | net/ntop/pkg-plist | 4 |
6 files changed, 65 insertions, 54 deletions
diff --git a/net/ntop/Makefile b/net/ntop/Makefile index cc36b4a5ccce..fbcc35708943 100644 --- a/net/ntop/Makefile +++ b/net/ntop/Makefile @@ -7,7 +7,7 @@ PORTNAME= ntop PORTVERSION= 3.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -23,18 +23,13 @@ LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd \ DBDIR?= /var/db -# Only need to be interactive if it's the first install. -.if !exists(${DBDIR}/ntop/ntop_pw.db) -IS_INTERACTIVE= yes -.endif - USE_GETOPT_LONG=yes +USE_GNOME= libxml2 USE_GMAKE= yes -USE_REINPLACE= yes USE_OPENSSL= yes GNU_CONFIGURE= yes INSTALLS_SHLIB= yes -PLIST_SUB+= DBDIR=${DBDIR} \ +PLIST_SUB= DBDIR=${DBDIR} \ SHLIB=${PORTVERSION:S/.p/pre/} CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --localstatedir=${DBDIR} \ @@ -48,6 +43,9 @@ CONFIGURE_ARGS+=--disable-ipv6 MAN8= ntop.8 +PKGDEINSTALL= ${WRKDIR}/pkg-deinstall +SUB_FILES= pkg-deinstall +SUB_LIST= DBDIR=${DBDIR} USE_RC_SUBR= ntop.sh ## @@ -55,12 +53,13 @@ USE_RC_SUBR= ntop.sh ## WITH_LOCALE: Enable locale (i18n) support. ## WITH_PCAP_PORT: Use libpcap from ports. ## WITH_XMLDUMP: Enable XML Dump support. -## +## WITH_ASDATA: Install AS data. ## WITHOUT_TCPWRAPPER: Disable TCP wrapper support. ## OPTIONS= LOCALE "Enable locale (i18n) support." Off \ PCAP_PORT "Use libpcap from ports." Off \ XMLDUMP "Enable XML Dump support." Off \ + ASDATA "Install AS data." Off \ TCPWRAPPER "Enable TCP wrapper support" On .include <bsd.port.pre.mk> @@ -71,20 +70,19 @@ CONFIGURE_ARGS+= --with-tcpwrap .if defined(WITH_PCAP_PORT) BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap -PCAP_ROOT= ${LOCALBASE} +CONFIGURE_ARGS+= --with-pcap-root=${LOCALBASE} .else -PCAP_ROOT= /usr +CONFIGURE_ARGS+= --with-pcap-root=/usr .endif -CONFIGURE_ARGS+= --with-pcap-root=${PCAP_ROOT} -.if defined(WITH_LOCALE) +.if defined(WITH_LOCALE) && !defined(WITHOUT_NLS) USE_GETTEXT= yes CONFIGURE_ARGS+= --enable-i18n \ --with-localedir=${LOCALBASE}/share/locale .endif .if defined(WITH_XMLDUMP) -BROKEN= "Does not build with XML dump support" +BROKEN= Does not build with XML dump support LIB_DEPENDS+= gdome.8:${PORTSDIR}/textproc/gdome2 CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include/libxml2 \ -I${LOCALBASE}/include/libxml2/libxml \ @@ -92,6 +90,13 @@ CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include/libxml2 \ -I${LOCALBASE}/include/glib-2.0" .endif +.if defined(WITH_ASDATA) +INSTALL_TARGET+= install install-data-as +PLIST_SUB+= ASDATA="" +.else +PLIST_SUB+= ASDATA="@comment " +.endif + post-extract: @${RM} ${WRKSRC}/configureextra/FREEBSD @@ -99,8 +104,5 @@ post-install: @${MKDIR} ${DBDIR}/ntop @${CHOWN} -R nobody:nobody ${DBDIR}/ntop @${RMDIR} ${PREFIX}/lib/plugins - @if [ ! -f ${DBDIR}/ntop/ntop_pw.db ]; then \ - ${PREFIX}/bin/ntop -u nobody -A; \ - fi .include <bsd.port.post.mk> diff --git a/net/ntop/files/ntop.sh.in b/net/ntop/files/ntop.sh.in index f2b1fee571ed..5b1e0deef45e 100644 --- a/net/ntop/files/ntop.sh.in +++ b/net/ntop/files/ntop.sh.in @@ -2,28 +2,36 @@ # # $FreeBSD$ # - # PROVIDE: ntop # REQUIRE: DAEMON # KEYWORD: shutdown - # # Add the following lines to /etc/rc.conf to enable ntop: # -#ntop_enable="YES" -# -# See ntop(8) for flags +# ntop_enable (bool): Set it to "YES" to enable ntop +# Default is "NO". +# ntop_flags (flags): Set extra flags to ntop +# Default is "-d --use-syslog=daemon". see ntop(8). # . %%RC_SUBR%% name=ntop -rcvar=`set_rcvar` +rcvar=${name}_enable + +load_rc_config $name + +: ${ntop_enable="NO"} +: ${ntop_flags="-d --use-syslog=daemon"} command=%%PREFIX%%/bin/ntop +start_precmd="${name}_checkpw" -ntop_enable=${ntop_enable:-"NO"} -ntop_flags=${ntop_flags:-"-d --use-syslog=daemon"} +ntop_checkpw() +{ + if [ ! -f %%DBDIR%%/ntop/ntop_pw.db ]; then + err 1 "Please set admin password for ntop. Run '%%PREFIX%%/bin/ntop -u nobody -A'" + fi +} -load_rc_config $name run_rc_command "$1" diff --git a/net/ntop/files/pkg-deinstall.in b/net/ntop/files/pkg-deinstall.in new file mode 100644 index 000000000000..2e0d9914e1da --- /dev/null +++ b/net/ntop/files/pkg-deinstall.in @@ -0,0 +1,23 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +case $2 in + DEINSTALL) + ;; + POST-DEINSTALL) + echo "===> post-deinstallation information for $1" + echo "" + echo " Please note that ntop was not completely removed" + echo " from this system:" + echo "" + echo " %%DBDIR%%/ntop can be removed if this port will not be" + echo " reinstalled." + echo "" + ;; + *) + exit 64 + ;; +esac +exit 0 diff --git a/net/ntop/pkg-deinstall b/net/ntop/pkg-deinstall deleted file mode 100644 index 75f7c1047af0..000000000000 --- a/net/ntop/pkg-deinstall +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net/ntop/Attic/pkg-deinstall,v 1.1 2005-12-12 07:03:16 lawrance Exp $ -# - -case $2 in -DEINSTALL) - ;; -POST-DEINSTALL) - echo "===> post-deinstallation information for $1" - echo "" - echo " Please note that ntop was not completely removed" - echo " from this system:" - echo "" - echo " /var/db/ntop can be removed if this port will not be" - echo " reinstalled." - echo "" - ;; -*) - exit 64 - ;; -esac -exit 0 diff --git a/net/ntop/pkg-descr b/net/ntop/pkg-descr index d0893002cd29..5dbc6769c155 100644 --- a/net/ntop/pkg-descr +++ b/net/ntop/pkg-descr @@ -2,8 +2,5 @@ ntop is a flexible and feature-rich tool for monitoring and troubleshooting local area networks. It provides command line and web interfaces, the latter via an embedded web server. ntop is based on libpcap. -Author: Luca Deri <deri@ntop.org> -WWW: http://www.ntop.org/ - --- Bill Fumerola <billf@FreeBSD.org> (original port) --- Johann Visagie <wjv@FreeBSD.org> (maintainer since 2.0) +Author: Luca Deri <deri@ntop.org> +WWW: http://www.ntop.org/ diff --git a/net/ntop/pkg-plist b/net/ntop/pkg-plist index c94491d12045..45cb8a8aee85 100644 --- a/net/ntop/pkg-plist +++ b/net/ntop/pkg-plist @@ -1,5 +1,6 @@ @exec mkdir -p %%DBDIR%%/ntop bin/ntop +%%ASDATA%%etc/ntop/AS-list.txt.gz etc/ntop/etter.finger.os.gz etc/ntop/ntop-cert.pem etc/ntop/oui.txt.gz @@ -15,14 +16,17 @@ lib/liblastSeenPlugin.so lib/libmyrrd.so lib/libmyrrd-%%SHLIB%%.so lib/libmyrrd.a +lib/libmyrrd.la lib/libnetflowPlugin-%%SHLIB%%.so lib/libnetflowPlugin.a lib/libnetflowPlugin.so lib/libntop-%%SHLIB%%.so lib/libntop.a +lib/libntop.la lib/libntop.so lib/libntopreport-%%SHLIB%%.so lib/libntopreport.a +lib/libntopreport.la lib/libntopreport.so lib/libpdaPlugin-%%SHLIB%%.so lib/libpdaPlugin.a |