2003-04-05 08:20:27 +00:00
|
|
|
# New ports collection makefile for: NetAMS
|
2003-12-26 17:12:31 +00:00
|
|
|
# Date created: 24 December 2003
|
|
|
|
# Whom: jura@netams.com
|
2003-04-05 08:20:27 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= netams
|
2006-06-14 12:08:24 +00:00
|
|
|
PORTVERSION= 3.3.5
|
2006-06-26 22:00:01 +00:00
|
|
|
PORTREVISION= 1
|
2004-02-23 04:42:13 +00:00
|
|
|
CATEGORIES= net-mgmt
|
2005-10-12 12:05:55 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
|
|
|
|
http://www.netams.com/files/
|
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
2005-01-24 17:10:43 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}
|
2003-04-05 08:20:27 +00:00
|
|
|
|
2003-12-26 17:12:31 +00:00
|
|
|
MAINTAINER= jura@netams.com
|
2003-04-05 08:20:27 +00:00
|
|
|
COMMENT= Network Traffic Accounting and Monitoring Software
|
|
|
|
|
2006-06-14 12:08:24 +00:00
|
|
|
NO_PACKAGE= Depends on kernel
|
2005-10-12 12:05:55 +00:00
|
|
|
|
2003-06-19 20:13:20 +00:00
|
|
|
USE_SUBMAKE= yes
|
2006-06-26 22:00:01 +00:00
|
|
|
USE_RC_SUBR= netams
|
2003-06-19 20:13:20 +00:00
|
|
|
MANCOMPRESSED= no
|
2003-04-05 08:20:27 +00:00
|
|
|
|
2003-06-19 20:13:20 +00:00
|
|
|
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
|
|
|
|
PREFIX="${PREFIX}" \
|
|
|
|
TOUCH="${TOUCH}" \
|
|
|
|
MKDIR="${MKDIR}" \
|
2005-10-12 12:05:55 +00:00
|
|
|
REALCURDIR="${.CURDIR}"
|
|
|
|
|
|
|
|
ADMINCGI= .htaccess index.cgi policy.cgi showusercard.cgi user.cgi \
|
|
|
|
access.cgi login.cgi quota.cgi showusercard.tmpl view.cgi \
|
|
|
|
account.cgi netams.cgi radius.cgi subplan.cgi config.cgi \
|
2006-06-14 12:08:24 +00:00
|
|
|
plan.cgi russian.res unit.cgi cardtool.cgi
|
2005-10-12 12:05:55 +00:00
|
|
|
CGI= .htaccess config.cgi netams_api.pl russian.res \
|
|
|
|
netams_example.cgi usertool.cgi admintool.cgi login.cgi \
|
2006-06-14 12:08:24 +00:00
|
|
|
netams_graph.cgi activate.cgi activate.tmpl
|
|
|
|
IMAGES= logo.gif logo_sm.jpg admintool-logo.gif showtable-logo.gif
|
2005-10-12 12:05:55 +00:00
|
|
|
MAN8= netams.8 flowprobe.8 netamsctl.8
|
|
|
|
|
|
|
|
SYSDIR?= /sys
|
|
|
|
|
|
|
|
OPTIONS= DEBUG "Build with debug symbols" off \
|
|
|
|
BW "Build with bandwidth limitation functionality" off \
|
|
|
|
HASH "Build with HASH support" off
|
2003-04-05 08:20:27 +00:00
|
|
|
|
2003-06-19 20:13:20 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
2003-04-05 08:20:27 +00:00
|
|
|
|
2006-06-14 12:08:24 +00:00
|
|
|
#.if !exists(${SYSDIR})
|
|
|
|
#IGNORE= Could not find the kernel sources in ${SYSDIR}. Please define SYSDIR
|
|
|
|
#.endif
|
2005-10-12 12:05:55 +00:00
|
|
|
|
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -E 's/^(CC).*/\1=$$(CXX)/; s|^(INCLUDE=).*|\1 ${LOCALBASE}/include|; s|^(CFLAGS).*=|\1+=|; /^FLAGS/d' \
|
|
|
|
${WRKSRC}/addon/Makefile.common
|
|
|
|
.if defined(WITHOUT_DEBUG)
|
|
|
|
@${REINPLACE_CMD} -e 's|configure.sh|configure.sh -nodebug|' \
|
|
|
|
${WRKSRC}/Makefile
|
|
|
|
.endif
|
2003-12-26 17:12:31 +00:00
|
|
|
|
2005-10-12 12:05:55 +00:00
|
|
|
.if defined(WITH_BW)
|
|
|
|
@${REINPLACE_CMD} -e 's|#DEFINE += -DHAVE_BW|DEFINE += -DHAVE_BW|' \
|
|
|
|
${WRKSRC}/addon/Makefile.common
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_HASH)
|
|
|
|
@${REINPLACE_CMD} -e 's|#DEFINE += -DUSE_HASH|DEFINE += -DUSE_HASH|' \
|
|
|
|
${WRKSRC}/addon/Makefile.common
|
|
|
|
.endif
|
2003-06-19 20:13:20 +00:00
|
|
|
|
2003-04-05 08:20:27 +00:00
|
|
|
do-install:
|
2005-10-12 12:05:55 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/netams ${PREFIX}/libexec/netams
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/flowprobe ${PREFIX}/sbin/flowprobe
|
2006-06-14 12:08:24 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/ipfw2netflow ${PREFIX}/sbin/ipfw2netflow
|
2005-10-12 12:05:55 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/netamsctl ${PREFIX}/bin/netamsctl
|
2006-06-14 12:08:24 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/addon/netams.cfg ${PREFIX}/etc/netams.cfg.sample
|
2005-10-12 12:05:55 +00:00
|
|
|
${MKDIR} ${DATADIR}/cgi-bin/admin ${DATADIR}/cgi-bin/images
|
2006-06-14 12:08:24 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/addon/ru-networks.txt ${DATADIR}/ru-networks.txt.sample
|
2005-10-12 12:05:55 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/addon/.netamsctl.rc ${DATADIR}
|
|
|
|
.for f in ${IMAGES}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/cgi-bin/images/${f} ${DATADIR}/cgi-bin/images
|
|
|
|
.endfor
|
|
|
|
.for f in ${CGI}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/cgi-bin/${f} ${DATADIR}/cgi-bin
|
2003-12-26 17:12:31 +00:00
|
|
|
.endfor
|
2005-10-12 12:05:55 +00:00
|
|
|
.for f in ${ADMINCGI}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/cgi-bin/admin/${f} ${DATADIR}/cgi-bin/admin
|
2003-04-05 08:20:27 +00:00
|
|
|
.endfor
|
2005-10-12 12:05:55 +00:00
|
|
|
.for f in ${MAN8}
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/doc/${f} ${PREFIX}/man/man8
|
2003-04-05 08:20:27 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
post-install:
|
2005-10-12 12:05:55 +00:00
|
|
|
@${SED} 's|%%PREFIX%%|${PREFIX}|g; s|%%DATADIR%%|${DATADIR}|g' \
|
|
|
|
${PKGMESSAGE}
|
2003-04-05 08:20:27 +00:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|