2003-05-12 18:17:50 +02:00
|
|
|
# New ports collection makefile for: pmacct
|
|
|
|
# Date created: Thu May 8 16:03:11 CEST 2003
|
|
|
|
# Whom: Kirill Ponomarew <ponomarew@oberon.net>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= pmacct
|
2012-04-26 23:33:54 +02:00
|
|
|
DISTVERSION= 0.14.0
|
2004-02-23 05:42:13 +01:00
|
|
|
CATEGORIES= net-mgmt
|
2011-05-15 16:08:00 +02:00
|
|
|
MASTER_SITES= http://www.pmacct.net/ \
|
2012-03-23 15:27:51 +01:00
|
|
|
http://mirrors.rit.edu/zi/
|
2003-05-12 18:17:50 +02:00
|
|
|
|
2011-07-15 23:15:29 +02:00
|
|
|
MAINTAINER= zi@FreeBSD.org
|
2005-01-12 17:15:57 +01:00
|
|
|
COMMENT= Accounting and aggregation tool for IPv4 and IPv6 traffic
|
2003-05-12 18:17:50 +02:00
|
|
|
|
2011-07-17 19:10:56 +02:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2011-05-15 16:08:00 +02:00
|
|
|
USE_RC_SUBR= pmacctd
|
|
|
|
SUB_FILES= pkg-message
|
2005-05-27 14:57:25 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2011-09-24 00:26:39 +02:00
|
|
|
CPPFLAGS+= "-I${LOCALBASE}/include"
|
|
|
|
LDFLAGS+= "-L${LOCALBASE}/lib"
|
2005-05-27 14:57:25 +02:00
|
|
|
|
2012-04-26 23:33:54 +02:00
|
|
|
OPTIONS= MYSQL "Enable MySQL support" off \
|
|
|
|
PGSQL "Enable PostgreSQL support" off \
|
|
|
|
SQLITE "Enable SQLite support" off \
|
|
|
|
THREADS "Enable multi-threading" off \
|
|
|
|
MMAP "Enable mmap(2) support" on \
|
|
|
|
LAYER2 "Enable Layer-2 support: MAC Adresses and VLANs" on \
|
|
|
|
IPV6 "Enable IPv6 support" on \
|
|
|
|
SHARED "Enable shared objects" on \
|
|
|
|
DEBUG "Enable debugging" off
|
2005-05-27 14:57:25 +02:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-09-19 15:53:30 +02:00
|
|
|
.if ${ARCH} == "amd64" || ${ARCH} == "sparc64"
|
2012-04-26 23:33:54 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-64bit
|
2005-09-19 15:53:30 +02:00
|
|
|
.endif
|
|
|
|
|
2003-07-02 14:04:18 +02:00
|
|
|
.if defined(WITH_MYSQL)
|
2003-10-02 21:33:40 +02:00
|
|
|
USE_MYSQL= yes
|
2004-01-29 14:05:08 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-mysql
|
2004-01-27 16:51:34 +01:00
|
|
|
PLIST_SUB+= WITH_MYSQL=""
|
2003-07-02 14:04:18 +02:00
|
|
|
.else
|
2012-04-26 23:33:54 +02:00
|
|
|
CONFIGURE_ARGS+=--disable-mysql
|
2004-01-27 16:51:34 +01:00
|
|
|
PLIST_SUB+= WITH_MYSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_PGSQL)
|
2005-01-31 01:35:55 +01:00
|
|
|
USE_PGSQL= yes
|
2004-01-27 16:51:34 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-pgsql
|
|
|
|
PLIST_SUB+= WITH_PGSQL=""
|
|
|
|
.else
|
2012-04-26 23:33:54 +02:00
|
|
|
CONFIGURE_ARGS+=--disable-pgsql
|
2004-01-27 16:51:34 +01:00
|
|
|
PLIST_SUB+= WITH_PGSQL="@comment "
|
2003-07-02 14:04:18 +02:00
|
|
|
.endif
|
|
|
|
|
2005-12-10 10:45:32 +01:00
|
|
|
.if defined(WITH_SQLITE)
|
2006-08-17 10:41:33 +02:00
|
|
|
USE_SQLITE= yes
|
2005-12-10 10:45:32 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-sqlite3 \
|
|
|
|
--with-sqlite3-includes=${LOCALBASE}/include
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-sqlite3
|
|
|
|
.endif
|
|
|
|
|
2005-02-02 18:41:45 +01:00
|
|
|
.if defined(WITHOUT_MMAP)
|
|
|
|
CONFIGURE_ARGS+=--disable-mmap
|
2005-06-14 22:30:13 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--enable-mmap
|
2004-07-14 21:01:15 +02:00
|
|
|
.endif
|
|
|
|
|
2005-05-27 14:57:25 +02:00
|
|
|
.if defined(WITHOUT_LAYER2)
|
|
|
|
CONFIGURE_ARGS+=--disable-l2
|
2005-06-14 22:30:13 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--enable-l2
|
2005-05-27 14:57:25 +02:00
|
|
|
.endif
|
2003-05-12 18:17:50 +02:00
|
|
|
|
2010-04-23 14:42:36 +02:00
|
|
|
.if defined(WITHOUT_IPV6)
|
|
|
|
CONFIGURE_ARGS+=--disable-ipv6
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--enable-ipv6
|
|
|
|
.endif
|
|
|
|
|
2010-05-17 10:50:20 +02:00
|
|
|
.if defined(WITH_THREADS)
|
|
|
|
CONFIGURE_ARGS+=--enable-threads
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-threads
|
|
|
|
.endif
|
|
|
|
|
2012-04-26 23:33:54 +02:00
|
|
|
.if defined(WITHOUT_SHARED)
|
|
|
|
CONFIGURE_ARGS+=--disable-so
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
CONFIGURE_ARGS+=--enable-debug
|
|
|
|
.endif
|
|
|
|
|
2004-01-29 14:05:08 +01:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|-O2||g' ${WRKSRC}/configure
|
2003-05-19 04:05:45 +02:00
|
|
|
|
2003-07-02 14:04:18 +02:00
|
|
|
post-install:
|
2012-04-26 23:33:54 +02:00
|
|
|
.if !defined(NOPORTEXAMPLES)
|
2004-04-14 21:14:25 +02:00
|
|
|
@${MKDIR} ${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
|
2012-04-26 23:33:54 +02:00
|
|
|
.endif
|
2003-07-02 14:04:18 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${DOCSDIR}
|
2012-05-27 17:52:31 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/docs/* ${DOCSDIR}
|
|
|
|
.for i in ChangeLog EXAMPLES FAQS README TOOLS CONFIG-KEYS KNOWN-BUGS
|
2003-07-02 14:04:18 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
|
|
|
|
.endfor
|
2003-05-12 18:17:50 +02:00
|
|
|
.endif
|
2011-05-15 16:08:00 +02:00
|
|
|
@${MKDIR} ${DATADIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/sql/* ${DATADIR}
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
2003-05-12 18:17:50 +02:00
|
|
|
|
2005-05-27 14:57:25 +02:00
|
|
|
.include <bsd.port.post.mk>
|