Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2018 18:52:28 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r478366 - head/net-mgmt/flowd
Message-ID:  <201808291852.w7TIqS6K059226@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Wed Aug 29 18:52:27 2018
New Revision: 478366
URL: https://svnweb.freebsd.org/changeset/ports/478366

Log:
  - Switch to options helpers
  - Use shebangfix instead of manually fixing shebangs
  - Add LICENSE

Modified:
  head/net-mgmt/flowd/Makefile

Modified: head/net-mgmt/flowd/Makefile
==============================================================================
--- head/net-mgmt/flowd/Makefile	Wed Aug 29 18:45:44 2018	(r478365)
+++ head/net-mgmt/flowd/Makefile	Wed Aug 29 18:52:27 2018	(r478366)
@@ -10,67 +10,59 @@ MASTER_SITES=	http://www2.mindrot.org/files/flowd/
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Small, fast, and secure NetFlow collector
 
-OPTIONS_SUB=	yes
-OPTIONS_DEFINE=	PERL PYTHON
-OPTIONS_DEFAULT=PERL
+LICENSE=	MIT BSD2CLAUSE BSD3CLAUSE
+LICENSE_COMB=	multi
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-PERL_DESC=	Install flowd perl module
-PYTHON_DESC=	Install flowd Python support
-
-USES=		gmake
+USES=		gmake shebangfix
+SHEBANG_FILES=	tools/*.pl
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--localstatedir=/var
 USE_RC_SUBR=	flowd
 PORTDOCS=	README INSTALL
+
 FLOWD_USER=	_flowd
+
 USERS=		${FLOWD_USER}
 GROUPS=		${FLOWD_USER}
 
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE=	PERL PYTHON DOCS EXAMPLES
+OPTIONS_DEFAULT=PERL
+OPTIONS_SUB=	yes
 
-.if ${PORT_OPTIONS:MPERL}
-USES+=		perl5
-USE_PERL5+=	build run
-.endif
+PERL_DESC=		Install flowd perl module
+PERL_USES=		perl5
+PYTHON_DESC=		Install flowd Python support
+PYTHON_USES=		python:2.7
+PYTHON_PLIST_SUB=	PYTHON_VER=${PYTHON_VER}
 
-.if ${PORT_OPTIONS:MPYTHON}
-USES+=		python:2.7
-PLIST_SUB+=	PYTHON_VER=${PYTHON_VER}
-.endif
-
 post-patch:
 	@${REINPLACE_CMD} -e "s;%%FLOWD_USER%%;${FLOWD_USER};g" \
 		${WRKSRC}/flowd.h
-	${REINPLACE_CMD} -i '' -e 's|/usr/bin/perl|${PERL}|' \
-		${WRKSRC}/tools/flowinsert.pl \
-		${WRKSRC}/tools/wormsuspects.pl
 
-post-build:
-.if ${PORT_OPTIONS:MPERL}
+post-build-PERL-on:
 	(cd ${WRKSRC}/Flowd-perl && ${PERL} Makefile.PL \
 		INSTALLSITEMAN3DIR=${PERL5_MAN3} \
 		DESTDIR=${STAGEDIR} PREFIX=${PREFIX} && \
 		${MAKE_CMD})
-.endif
 
-.if ${PORT_OPTIONS:MPYTHON}
+post-build-PYTHON-on:
 	( cd ${WRKSRC} && ${PYTHON_CMD} setup.py build )
-.endif
 
-pre-install:
+pre-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+pre-install-EXAMPLES-on:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	( cd ${WRKSRC}/tools && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} )
 
-.if ${PORT_OPTIONS:MPERL}
+pre-install-PERL-on:
 	( cd ${WRKSRC}/Flowd-perl && ${MAKE_CMD} install )
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Flowd/Flowd.so
-.endif
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Flowd/Flowd.so
 
-.if ${PORT_OPTIONS:MPYTHON}
+pre-install-PYTHON-on:
 	( cd ${WRKSRC} && ${PYTHON_CMD} setup.py install --root "${STAGEDIR}" )
-	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/flowd.so
-.endif
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/flowd.so
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808291852.w7TIqS6K059226>