update to pmacct-1.7.1 (requested by David Higgs) and enable some of the

optional features that only have lightweight dependencies. tidy up example
installation.
This commit is contained in:
sthen 2018-05-18 10:52:13 +00:00
parent f676cb2502
commit 41d2ec1ab8
7 changed files with 85 additions and 62 deletions

View File

@ -1,63 +1,70 @@
# $OpenBSD: Makefile,v 1.26 2018/01/24 21:22:58 job Exp $
# $OpenBSD: Makefile,v 1.27 2018/05/18 10:52:13 sthen Exp $
COMMENT= IP accounting software
COMMENT= passive IP network monitoring tools: traffic accounting, etc
DISTNAME= pmacct-1.7.0
DISTNAME= pmacct-1.7.1
CATEGORIES= net
HOMEPAGE= http://www.pmacct.net/
MASTER_SITES= http://www.pmacct.net/
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
WANTLIB= c m pcap pthread sqlite3>=8 z
MASTER_SITES= ${HOMEPAGE}
NO_TEST= Yes
CONFIGURE_STYLE= autoconf no-autoheader
AUTOCONF_VERSION= 2.69
USE_GMAKE= Yes
CONFIGURE_ARGS= --enable-ipv6 \
--enable-sqlite3 \
--with-sqlite3-includes="${LOCALBASE}/include"
.ifdef DEBUG
MAKE_ARGS+= DEBUG=1
.endif
WANTLIB += c jansson m maxminddb pcap pthread sodium sqlite3 z zmq
FLAVORS= mysql postgresql
FLAVOR?=
LIB_DEPENDS+= databases/sqlite3
LIB_DEPENDS+= databases/sqlite3 \
devel/jansson \
net/libmaxminddb \
net/zeromq
CONFIGURE_STYLE= autoconf no-autoheader
AUTOCONF_VERSION= 2.69
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include"
CONFIGURE_ARGS= --enable-ipv6 \
--enable-geoipv2 \
--enable-jansson \
--enable-sqlite3 \
--enable-zmq
USE_GMAKE= Yes
NO_TEST= Yes
.if ${FLAVOR:Mpostgresql}
LIB_DEPENDS+= databases/postgresql
WANTLIB += pq>=2
CONFIGURE_ARGS+= --enable-pgsql \
--with-pgsql-includes="${LOCALBASE}/include/postgresql/"
CONFIGURE_ARGS+= --enable-pgsql
.else
CONFIGURE_ARGS+= --disable-pgsql
.endif
.if ${FLAVOR:Mmysql}
LIB_DEPENDS+= databases/mariadb
WANTLIB += lib/mysql/mysqlclient ${COMPILER_LIBCXX}
WANTLIB+= crypto mysqlclient ssl
CONFIGURE_ARGS+= --enable-mysql
.else
CONFIGURE_ARGS+= --disable-mysql
.endif
.ifdef DEBUG
MAKE_ARGS+= DEBUG=1
.endif
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pmacct
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pmacct/sql
${INSTALL_DATA} ${WRKSRC}/{CONFIG-KEYS,FAQS,QUICKSTART,TOOLS,UPGRADE} \
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pmacct \
${PREFIX}/share/examples/pmacct/{lg,sql}
cd ${WRKSRC}; ${INSTALL_DATA} [A-Z]!(akefile*) sql/README* \
${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} ${WRKSRC}/docs/* ${PREFIX}/share/doc/pmacct/
cp -r ${WRKSRC}/examples/* ${PREFIX}/share/examples/pmacct/
cp -r ${WRKSRC}/examples/!(lg) ${PREFIX}/share/examples/pmacct/
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/examples/pmacct/
chmod -R a+rX ${PREFIX}/share/examples/pmacct/
${INSTALL_DATA} ${WRKSRC}/sql/README* ${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} `find ${WRKSRC}/sql -type f \! -name README*` \
cd ${WRKSRC}/examples; \
${INSTALL_PROGRAM} lg/pmbgp ${PREFIX}/share/examples/pmacct/lg/; \
${INSTALL_DATA} lg/pmbgp.py ${PREFIX}/share/examples/pmacct/lg/
${INSTALL_DATA} ${WRKSRC}/sql/!(README*) \
${PREFIX}/share/examples/pmacct/sql/
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (pmacct-1.7.0.tar.gz) = 19c3795db452191c2b1b9533fecaf69c6767c9fb7b4ae60ae3f28e24eb2ee9c8
SIZE (pmacct-1.7.0.tar.gz) = 1351888
SHA256 (pmacct-1.7.1.tar.gz) = A8P1YVItCodrltEwO3YLER+/n57zZyxPd1akWSRgXCM=
SIZE (pmacct-1.7.1.tar.gz) = 1392360

View File

@ -1,6 +1,7 @@
diff --git configure.ac configure.ac
index c22d91e..aacb5b1 100644
--- configure.ac
$OpenBSD: patch-configure_ac,v 1.1 2018/05/18 10:52:13 sthen Exp $
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -26,12 +26,6 @@ AC_MSG_RESULT($host_os)
AC_MSG_CHECKING(hardware)

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-src_bgp_bgp_h,v 1.1 2018/05/18 10:52:13 sthen Exp $
Index: src/bgp/bgp.h
--- src/bgp/bgp.h.orig
+++ src/bgp/bgp.h
@@ -21,6 +21,7 @@
/* includes */
#include <sys/poll.h>
+#include <pthread.h>
#include "bgp_prefix.h"
#include "bgp_packet.h"
#include "bgp_table.h"

View File

@ -1,6 +1,8 @@
$OpenBSD: patch-src_isis_isis_c,v 1.2 2016/06/02 11:52:32 sthen Exp $
--- src/isis/isis.c.orig Tue Jan 12 14:59:07 2016
+++ src/isis/isis.c Sat May 21 11:34:49 2016
$OpenBSD: patch-src_isis_isis_c,v 1.3 2018/05/18 10:52:13 sthen Exp $
Index: src/isis/isis.c
--- src/isis/isis.c.orig
+++ src/isis/isis.c
@@ -820,7 +820,7 @@ void igp_daemon_map_initialize(char *filename, struct
pcap_t *p;

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-src_isis_thread_c,v 1.1 2014/03/22 23:05:43 sthen Exp $
--- src/isis/thread.c.orig Sun Mar 16 01:43:22 2014
+++ src/isis/thread.c Sun Mar 16 01:43:59 2014
@@ -20,6 +20,7 @@
*/
#define __THREAD_C
+#include <stdint.h>
#include "pmacct.h"
#include "isis.h"

View File

@ -1,57 +1,69 @@
@comment $OpenBSD: PLIST,v 1.8 2018/01/24 21:22:58 job Exp $
@comment $OpenBSD: PLIST,v 1.9 2018/05/18 10:52:13 sthen Exp $
@pkgpath net/pmacct,threads
@bin bin/pmacct
@bin sbin/nfacctd
@bin sbin/pmacctd
@bin sbin/pmbgpd
@bin sbin/pmbmpd
@bin sbin/pmtelemetryd
@bin sbin/sfacctd
%%mysql%%
%%postgresql%%
share/doc/pmacct/
share/doc/pmacct/AUTHORS
share/doc/pmacct/CONFIG-KEYS
share/doc/pmacct/COPYING
share/doc/pmacct/ChangeLog
share/doc/pmacct/FAQS
share/doc/pmacct/INTERNALS
share/doc/pmacct/IPFIX
share/doc/pmacct/PLUGINS
share/doc/pmacct/INSTALL
share/doc/pmacct/QUICKSTART
share/doc/pmacct/README.64bit
share/doc/pmacct/README.GeoIP
share/doc/pmacct/README.IPv6
share/doc/pmacct/README.cos
share/doc/pmacct/README.GeoIP
share/doc/pmacct/README.custom_primitives
share/doc/pmacct/README.etype
share/doc/pmacct/README.export_proto
share/doc/pmacct/README.iface
share/doc/pmacct/README.label
share/doc/pmacct/README.mask
share/doc/pmacct/README.mpls
share/doc/pmacct/README.nat
share/doc/pmacct/README.pkt_len_distrib
share/doc/pmacct/README.sampling_rate
share/doc/pmacct/README.sqlite3
share/doc/pmacct/README.tag2
share/doc/pmacct/README.timestamp
share/doc/pmacct/SIGNALS
share/doc/pmacct/README.tunnel
share/doc/pmacct/TOOLS
share/doc/pmacct/TRIGGER_VARS
share/doc/pmacct/UPGRADE
share/examples/pmacct/
share/examples/pmacct/agent_to_peer.map.example
share/examples/pmacct/allow-list.example
share/examples/pmacct/allow.lst.example
share/examples/pmacct/amqp/
share/examples/pmacct/amqp/amqp_receiver.py
share/examples/pmacct/avro/
share/examples/pmacct/avro/avro_file_decoder.py
share/examples/pmacct/bgp_agent.map.example
share/examples/pmacct/bgp_md5.lst.example
share/examples/pmacct/bgp_xconnects.map.example
share/examples/pmacct/flow_to_rd.map.example
share/examples/pmacct/gnuplot-example.sh
share/examples/pmacct/gnuplot.script.example
share/examples/pmacct/kafka/
share/examples/pmacct/kafka/kafka_consumer.py
share/examples/pmacct/lg/
@bin share/examples/pmacct/lg/pmbgp
share/examples/pmacct/lg/pmbgp.py
share/examples/pmacct/lpref.map.example
share/examples/pmacct/med.map.example
share/examples/pmacct/mrtg-example.sh
share/examples/pmacct/mrtg.conf.example
share/examples/pmacct/misc/
share/examples/pmacct/misc/gnuplot-example.sh
share/examples/pmacct/misc/gnuplot.script.example
share/examples/pmacct/misc/mrtg-example.sh
share/examples/pmacct/misc/mrtg.conf.example
share/examples/pmacct/misc/rrdtool-example.sh
share/examples/pmacct/networks.lst.example
share/examples/pmacct/nfacctd-print.conf.example
share/examples/pmacct/nfacctd-sql_v1.conf.example
share/examples/pmacct/nfacctd-sql_v2.conf.example
share/examples/pmacct/pcap_interfaces.map.example
share/examples/pmacct/peers.map.example
share/examples/pmacct/pmacctd-imt.conf.example
share/examples/pmacct/pmacctd-multiple-plugins.conf.example
@ -63,7 +75,6 @@ share/examples/pmacct/pretag.map.example
share/examples/pmacct/primitives.lst.example
share/examples/pmacct/probe_netflow.conf.example
share/examples/pmacct/probe_sflow.conf.example
share/examples/pmacct/rrdtool-example.sh
share/examples/pmacct/sampling.map.example
share/examples/pmacct/sql/
share/examples/pmacct/sql/pmacct-create-table_bgp_v1.sqlite3