diff --git a/net-mgmt/ipfixcol2/Makefile b/net-mgmt/ipfixcol2/Makefile index f2bb7613e465..34b823dd40bb 100644 --- a/net-mgmt/ipfixcol2/Makefile +++ b/net-mgmt/ipfixcol2/Makefile @@ -1,39 +1,45 @@ -PORTNAME= ipfixcol2 +PORTNAME= ipfixcol2 DISTVERSIONPREFIX= v DISTVERSION= 2.6.0 -CATEGORIES= net-mgmt +CATEGORIES= net-mgmt MAINTAINER= zarychtam@plan-b.pwste.edu.pl COMMENT= NetFlow v5/v9 and IPFIX flow (RFC 7011) data collector WWW= https://github.com/CESNET/ipfixcol2 -LICENSE= GPLv2 +LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -LIB_DEPENDS= librdkafka.so:net/librdkafka \ - libepoll-shim.so:devel/libepoll-shim \ - libfds.so:net-mgmt/libfds +ONLY_FOR_ARCHS= aarch64 amd64 armv7 +ONLY_FOR_ARCHS_REASON= Require SSE2 and static_assert(sizeof(uint64_t) == sizeof(time_t), "Assumed that time_t is uint64_t, but it's not") -BUILD_DEPENDS= rst2man:textproc/py-docutils -USES= cmake localbase:ldflags pkgconfig +BUILD_DEPENDS= rst2man:textproc/py-docutils@${PY_FLAVOR} +LIB_DEPENDS= librdkafka.so:net/librdkafka \ + libepoll-shim.so:devel/libepoll-shim \ + libfds.so:net-mgmt/libfds +USES= cmake localbase:ldflags pkgconfig USE_GITHUB= yes GH_ACCOUNT= CESNET -USE_RC_SUBR=${PORTNAME} -USERS= ${PORTNAME} -GROUPS= ${PORTNAME} -PORTEXAMPLES= * +USE_RC_SUBR= ${PORTNAME} + +CXXFLAGS+= -D_GNU_SOURCE +LDFLAGS+= -rdynamic -LDFLAGS+= -rdynamic -CXXFLAGS+= -D_GNU_SOURCE +SUB_LIST= USER=${USERS:[0]} +USERS= ${PORTNAME} +GROUPS= ${PORTNAME} +PORTEXAMPLES= * -OPTIONS_DEFINE= EXAMPLES +OPTIONS_DEFINE= EXAMPLES post-install: ${MKDIR} ${STAGEDIR}${ETCDIR} ${STAGEDIR}/var/run/${PORTNAME} - ${INSTALL_DATA} ${WRKSRC}/doc/data/configs/udp2json.xml ${STAGEDIR}${ETCDIR}/startup.xml.sample + ${INSTALL_DATA} ${WRKSRC}/doc/data/configs/udp2json.xml \ + ${STAGEDIR}${ETCDIR}/startup.xml.sample post-install-EXAMPLES-on: - cd ${WRKSRC}/doc/data && ${COPYTREE_SHARE} "configs" ${STAGEDIR}${EXAMPLESDIR} + (cd ${WRKSRC}/doc/data && ${COPYTREE_SHARE} "configs" \ + ${STAGEDIR}${EXAMPLESDIR}) .include diff --git a/net-mgmt/ipfixcol2/files/ipfixcol2.in b/net-mgmt/ipfixcol2/files/ipfixcol2.in index 56e21238f8e6..8e50be3fa610 100644 --- a/net-mgmt/ipfixcol2/files/ipfixcol2.in +++ b/net-mgmt/ipfixcol2/files/ipfixcol2.in @@ -1,30 +1,30 @@ #!/bin/sh # PROVIDE: ipfixcol2 # REQUIRE: NETWORKING SERVERS LOGIN # BEFORE: securelevel # KEYWORD: shutdown # Add the following line to /etc/rc.conf to enable 'ipfixcol2': # # ipfixcol2_enable="YES" # . /etc/rc.subr name=ipfixcol2 desc="ipfixcol2 startup script" rcvar=ipfixcol2_enable load_rc_config "$name" : ${ipfixcol2_enable:=NO} : ${ipfixcol2_conf:=%%PREFIX%%/etc/$name.conf} : ${ipfixcol2_flags:=""} -: ${ipfixcol2_user:=ipfixcol2} +: ${ipfixcol2_user:=%%USER%%} command=%%PREFIX%%/bin/ipfixcol2 command_args="-d -P /var/run/$name/$name.pid ${ipfixcol2_flags}" pidfile=/var/run/$name/$name.pid run_rc_command "$1"