aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2014-08-17 20:04:47 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2014-08-17 20:04:47 +0000
commit8d71942f39402092d0d55730a5678f053910391a (patch)
tree7c371b73a6431777462470f5a9506b574a0f765e /net-mgmt
parentf074491155f84c3674e7e6e34d131d6bfbee3662 (diff)
downloadports-8d71942f39402092d0d55730a5678f053910391a.tar.gz
ports-8d71942f39402092d0d55730a5678f053910391a.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/flowd/Makefile54
-rw-r--r--net-mgmt/flowd/pkg-plist9
2 files changed, 32 insertions, 31 deletions
diff --git a/net-mgmt/flowd/Makefile b/net-mgmt/flowd/Makefile
index 8e7e74b95e17..591a8b0abaf4 100644
--- a/net-mgmt/flowd/Makefile
+++ b/net-mgmt/flowd/Makefile
@@ -11,6 +11,7 @@ MASTER_SITES= GOOGLE_CODE \
MAINTAINER= ports@FreeBSD.org
COMMENT= Small, fast, and secure NetFlow collector
+OPTIONS_SUB= yes
OPTIONS_DEFINE= PERL PYTHON
OPTIONS_DEFAULT=PERL
@@ -21,30 +22,21 @@ USES= gmake
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --localstatedir=/var
USE_RC_SUBR= flowd
-MAN8= flowd.8 flowd-reader.8
-MAN5= flowd.conf.5
PORTDOCS= README INSTALL
FLOWD_USER= _flowd
USERS= ${FLOWD_USER}
GROUPS= ${FLOWD_USER}
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPERL}
USES+= perl5
-PLIST_SUB+= PERL=""
-MAN3= Flowd.3
-.else
-PLIST_SUB+= PERL="@comment "
+USE_PERL5+= build run fixpacklist
.endif
.if ${PORT_OPTIONS:MPYTHON}
-USE_PYTHON= yes
-PLIST_SUB+= PYTHON=""
-INSTALLS_EGGINFO= yes
-.else
-PLIST_SUB+= PYTHON="@comment "
+USES+= python
+PLIST_SUB+= PYTHON_VER=${PYTHON_VER}
.endif
post-patch:
@@ -54,29 +46,33 @@ post-patch:
${WRKSRC}/tools/flowinsert.pl \
${WRKSRC}/tools/wormsuspects.pl
-post-install:
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
-.endif
-
+post-build:
.if ${PORT_OPTIONS:MPERL}
- cd ${WRKSRC}/Flowd-perl && \
- ${PERL} Makefile.PL INSTALLSITEMAN3DIR=${MAN3PREFIX}/man/man3 PREFIX=${PREFIX} && \
- ${MAKE_CMD} && \
- ${MAKE_CMD} install;
- -@${RM} -f ${PREFIX}/lib/perl5/${PERL_VER}/${PERL_ARCH}/perllocal.pod
+ (cd ${WRKSRC}/Flowd-perl && ${PERL} Makefile.PL \
+ INSTALLSITEMAN3DIR=${PERL5_MAN3} \
+ DESTDIR=${STAGEDIR} PREFIX=${PREFIX} && \
+ ${MAKE_CMD})
.endif
.if ${PORT_OPTIONS:MPYTHON}
- cd ${WRKSRC} && \
- ${PYTHON_CMD} setup.py build && \
- ${PYTHON_CMD} setup.py install
+ ( cd ${WRKSRC} && ${PYTHON_CMD} setup.py build )
.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
- ${MKDIR} ${EXAMPLESDIR}
- @( cd ${WRKSRC}/tools && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/ )
+post-install:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ( cd ${WRKSRC}/tools && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} )
+
+.if ${PORT_OPTIONS:MPERL}
+ ( cd ${WRKSRC}/Flowd-perl && ${MAKE_CMD} install )
+ -${RM} -f ${STAGEDIR}${PREFIX}/lib/perl5/${PERL_VER}/${PERL_ARCH}/perllocal.pod
+ ${STRIP_CMD} ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/auto/Flowd/Flowd.so
+.endif
+
+.if ${PORT_OPTIONS:MPYTHON}
+ ( cd ${WRKSRC} && ${PYTHON_CMD} setup.py install --root "${STAGEDIR}" )
+ ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/flowd.so
.endif
.include <bsd.port.mk>
diff --git a/net-mgmt/flowd/pkg-plist b/net-mgmt/flowd/pkg-plist
index 970ebf5359a9..00d504f72f32 100644
--- a/net-mgmt/flowd/pkg-plist
+++ b/net-mgmt/flowd/pkg-plist
@@ -8,10 +8,15 @@ include/flowd/flowd-pytypes.h
include/flowd/store-v2.h
include/flowd/store.h
lib/libflowd.a
+%%PERL%%%%PERL5_MAN3%%/Flowd.3.gz
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Flowd.pm
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/.packlist
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/Flowd.so
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/flowd-0.9.1-py%%PYTHON_VER%%.egg-info
%%PYTHON%%%%PYTHON_SITELIBDIR%%/flowd.so
+man/man5/flowd.conf.5.gz
+man/man8/flowd-reader.8.gz
+man/man8/flowd.8.gz
sbin/flowd
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README.tools
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/flowinsert.pl
@@ -24,7 +29,7 @@ sbin/flowd
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sockclient.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/stats.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/wormsuspects.pl
+@dirrm include/flowd
+%%PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/flowrrd
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
-%%PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd
-@dirrm include/flowd