aboutsummaryrefslogtreecommitdiff
path: root/net/ntop/Makefile
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2003-12-12 21:03:57 +0000
committerPav Lucistnik <pav@FreeBSD.org>2003-12-12 21:03:57 +0000
commita44b9103bff26a3c537da63145f35f58a8b4b458 (patch)
treebfd6c0389354e2ad15bc59196e486ac83c8edc41 /net/ntop/Makefile
parent4d56f646a3eb292c15cdb85a24a0fbd2e058b6e8 (diff)
downloadports-a44b9103bff26a3c537da63145f35f58a8b4b458.tar.gz
ports-a44b9103bff26a3c537da63145f35f58a8b4b458.zip
Notes
Diffstat (limited to 'net/ntop/Makefile')
-rw-r--r--net/ntop/Makefile102
1 files changed, 76 insertions, 26 deletions
diff --git a/net/ntop/Makefile b/net/ntop/Makefile
index 151273273d95..7c4de85e8862 100644
--- a/net/ntop/Makefile
+++ b/net/ntop/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ntop
PORTVERSION= 2.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -16,12 +16,8 @@ EXTRACT_SUFX= .tgz
MAINTAINER= sheepkiller@cultdeadsheep.org
COMMENT= Network monitoring tool with command line and web interfaces
-BUILD_DEPENDS= ${LOCALBASE}/lib/libgdc.a:${PORTSDIR}/graphics/gdchart
-LIB_DEPENDS= gdbm:${PORTSDIR}/databases/gdbm
-
-.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
-IS_INTERACTIVE= yes
-.endif
+LIB_DEPENDS= gd1.2:${PORTSDIR}/graphics/gd1 \
+ gdbm:${PORTSDIR}/databases/gdbm
DBDIR?= /var/db
@@ -33,28 +29,86 @@ USE_OPENSSL= yes
USE_LIBTOOL= yes
INSTALLS_SHLIB= yes
PLIST_SUB+= DBDIR=${DBDIR}
-CONFIGURE_ENV= LIBS="-lcrypto -L${LOCALBASE}/lib"
+CONFIGURE_ENV= LIBS="-lcrypto -L${LOCALBASE}/lib ${LDFLAGS}"
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --localstatedir=${DBDIR} \
--with-ossl-root=${OPENSSLBASE} \
- --with-gdchart-root=${LOCALBASE}
-SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
- TOUCH="${TOUCH}" \
- MKDIR="${MKDIR}" \
- CAT="${CAT}" \
- OPTIONS="${OPTIONS}" \
- REALCURDIR="${.CURDIR}"
+ --with-gdbm-root=${LOCALBASE} \
+ --with-gdchart-lib=${WRKSRC}/../gdchart0.94c \
+ --with-gdchart-include=${WRKSRC}/../gdchart0.94c \
+ --with-gd-root=${LOCALBASE} \
+ --with-libpng-root=${LOCALBASE} \
+ --with-zlib-root=/usr
MAN8= ntop.8
-.include <bsd.port.pre.mk>
+##
+## Available knobs:
+## WITH_LOCALE: Enable locale (i18n) support.
+## WITH_LSOF: Add lsof as dependency.
+## WITH_PCAP: Enable libpcap support.
+## WITH_PCAP_PORT: Use libpcap from ports.
+## WITH_RRD: Enablerrdtool support.
+## WITH_XMLDUMP: Enable XML Dump support.
+##
+## WITHOUT_GDBM: Disable gdbm support.
+## WITHOUT_TCPWRAPPER: Disable TCP wrapper support.
+##
-pre-fetch:
- @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.sh
+.if !defined(WITHOUT_TCPWRAPPER)
+CONFIGURE_ARGS+= --with-tcpwrap
+.endif
-post-patch:
- @${REINPLACE_CMD} -e "s,-lgdchart,-lgdc,g" \
- -e "s,-lglib,-lglib12,g" ${WRKSRC}/configure
+.if defined(WITH_PCAP)
+. if defined(WITH_PCAP_PORT)
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap
+PCAP_ROOT= ${LOCALBASE}
+. else
+PCAP_ROOT= /usr
+. endif
+CONFIGURE_ARGS+= --with-pcap-root=${PCAP_ROOT}
+.endif
+
+.if defined(WITH_RRD)
+LIB_DEPENDS+= rrd.0:${PORTSDIR}/net/rrdtool
+CONFIGURE_ARGS+= --enable-rrd
+ --with-rrd-root=${LOCALBASE}
+.else
+CONFIGURE_ARGS+= --without-rrd-root
+.endif
+
+.if defined(WITH_LSOF)
+RUN_DEPENDS+= lsof:${PORTSDIR}/sysutils/lsof
+.endif
+
+.if defined(WITH_LOCALE)
+LIB_DEPENDS+= intl.5:${PORTSDIR}/devel/gettext
+CONFIGURE_ARGS+= --enable-i18n \
+ --with-localedir=${LOCALBASE}/share/locale
+.endif
+
+.if defined(WITH_XMLDUMP)
+LIB_DEPENDS+= gdome.8:${PORTSDIR}/textproc/gdome2
+CONFIGURE_ARGS+= --enable-xmldump \
+ --with-xml2-lib=${LOCALBASE}/lib \
+ --with-xml2-include=${LOCALBASE}/include/libxml2/libxml \
+ --with-gdome-lib=${LOCALBASE}/lib \
+ --with-gdome-include=${LOCALBASE}/include/libgdome \
+ --with-glib-lib=${LOCALBASE}/lib \
+ --with-glib-include=${LOCALBASE}/include/glib12
+CONFIGURE_ENV+= "CPPFLAGS=-I${LOCALBASE}/include/libxml2 "
+.endif
+
+pre-everything:: show-options
+
+show-options:
+ @${SED} -ne 's/^##//p' ${.CURDIR}/Makefile
+
+# This part is a little bit dirty, but configure script need gdchart linked against
+# libgd1.
+pre-configure:
+ @${CP} ${FILESDIR}/Makefile.gdchart ${WRKSRC}/../gdchart0.94c/Makefile
+ @(cd ${WRKSRC}/../gdchart0.94c ; ${SETENV} ${MAKE_ENV} ${MAKE})
post-install:
@${MKDIR} ${DBDIR}/ntop
@@ -70,8 +124,4 @@ post-install:
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
-.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
-.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>