diff options
author | jhale <jhale@FreeBSD.org> | 2012-10-26 14:01:27 +0800 |
---|---|---|
committer | jhale <jhale@FreeBSD.org> | 2012-10-26 14:01:27 +0800 |
commit | 807052647c511afe959c92a9778fbaa6f2755757 (patch) | |
tree | 2bc480450dbf6177d0a707dfccb2e3434f522fa1 | |
parent | 34fbc04a12095f7e641771db31eb2c6c56e18f6d (diff) | |
download | freebsd-ports-gnome-807052647c511afe959c92a9778fbaa6f2755757.tar.gz freebsd-ports-gnome-807052647c511afe959c92a9778fbaa6f2755757.tar.zst freebsd-ports-gnome-807052647c511afe959c92a9778fbaa6f2755757.zip |
- Convert to new options framework
While here:
- Trim Makefile header
- Use GOOGLE_CODE macro in MASTER_SITES
- Remove the name of the port from COMMENT
PR: ports/172517
Submitted by: pjg
Approved by: maintainer timeout (17 days)
makc, avilla (mentors, implicit)
Feature safe: yes
-rw-r--r-- | net-mgmt/flowd/Makefile | 53 | ||||
-rw-r--r-- | net-mgmt/flowd/pkg-plist | 12 |
2 files changed, 25 insertions, 40 deletions
diff --git a/net-mgmt/flowd/Makefile b/net-mgmt/flowd/Makefile index 15a827951115..897155958c4a 100644 --- a/net-mgmt/flowd/Makefile +++ b/net-mgmt/flowd/Makefile @@ -1,24 +1,21 @@ -# New ports collection makefile for: flowd -# Date created: 9 October 2004 -# Whom: Janos Mohacsi <janos.mohacsi@bsd.hu> -# +# Created by: Janos Mohacsi <janos.mohacsi@bsd.hu> # $FreeBSD$ -# PORTNAME= flowd PORTVERSION= 0.9.1 PORTREVISION= 2 CATEGORIES= net-mgmt ipv6 -MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} \ +MASTER_SITES= GOOGLE_CODE \ http://www2.mindrot.org/files/flowd/ MAINTAINER= janos.mohacsi@bsd.hu -COMMENT= The flowd is a small, fast, and secure NetFlow collector +COMMENT= Small, fast, and secure NetFlow collector -OPTIONS= PERL "Install flowd perl module" on \ - PYTHON "Install flowd Python support" off +OPTIONS_DEFINE= PERL PYTHON +OPTIONS_DEFAULT=PERL -.include <bsd.port.options.mk> +PERL_DESC= Install flowd perl module +PYTHON_DESC= Install flowd Python support GNU_CONFIGURE= yes CONFIGURE_ARGS= --localstatedir=/var @@ -31,34 +28,22 @@ FLOWD_USER= _flowd USERS= ${FLOWD_USER} GROUPS= ${FLOWD_USER} -.if defined(WITH_PERL) +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MPERL} USE_PERL5= yes -PLIST_SUB+= WITH_PERL="" +PLIST_SUB+= PERL="" MAN3= Flowd.3 .else -PLIST_SUB+= WITH_PERL="@comment " +PLIST_SUB+= PERL="@comment " .endif -.if defined(WITH_PYTHON) +.if ${PORT_OPTIONS:MPYTHON} USE_PYTHON= yes -PLIST_SUB+= WITH_PYTHON="" +PLIST_SUB+= PYTHON="" INSTALLS_EGGINFO= yes .else -PLIST_SUB+= WITH_PYTHON="@comment " -.endif - -pre-extract: - @${ECHO_MSG} "" -.if defined(WITH_PERL) - @${ECHO_MSG} "Build with perl bindings." -.else - @${ECHO_MSG} "You can enable perl bindings by defining WITH_PERL" -.endif - @${ECHO_MSG} "" -.if defined(WITH_PYTHON) - @${ECHO_MSG} "Build with Python bindings." -.else - @${ECHO_MSG} "You can enable Python bindings by defining WITH_PYTHON." +PLIST_SUB+= PYTHON="@comment " .endif post-patch: @@ -69,12 +54,12 @@ post-patch: ${WRKSRC}/tools/wormsuspects.pl post-install: -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif -.if defined(WITH_PERL) +.if ${PORT_OPTIONS:MPERL} cd ${WRKSRC}/Flowd-perl && \ ${PERL} Makefile.PL INSTALLSITEMAN3DIR=${MAN3PREFIX}/man/man3 PREFIX=${PREFIX} && \ ${GMAKE} && \ @@ -82,13 +67,13 @@ post-install: -@${RM} -f ${PREFIX}/lib/perl5/${PERL_VERSION}/${PERL_ARCH}/perllocal.pod .endif -.if defined(WITH_PYTHON) +.if ${PORT_OPTIONS:MPYTHON} cd ${WRKSRC} && \ ${PYTHON_CMD} setup.py build && \ ${PYTHON_CMD} setup.py install .endif -.if !defined(NOPORTEXAMPLES) +.if ${PORT_OPTIONS:MEXAMPLES} ${MKDIR} ${EXAMPLESDIR} @( cd ${WRKSRC}/tools && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/ ) .endif diff --git a/net-mgmt/flowd/pkg-plist b/net-mgmt/flowd/pkg-plist index 6c65956dd9ac..a46020efd18c 100644 --- a/net-mgmt/flowd/pkg-plist +++ b/net-mgmt/flowd/pkg-plist @@ -8,11 +8,11 @@ include/flowd/flowd-pytypes.h include/flowd/store-v2.h include/flowd/store.h lib/libflowd.a -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Flowd.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/.packlist -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/Flowd.bs -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/Flowd.so -%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/flowd.so +%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Flowd.pm +%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/.packlist +%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/Flowd.bs +%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/Flowd.so +%%PYTHON%%%%PYTHON_SITELIBDIR%%/flowd.so sbin/flowd %%PORTEXAMPLES%%%%EXAMPLESDIR%%/README.tools %%PORTEXAMPLES%%%%EXAMPLESDIR%%/flowinsert.pl @@ -27,5 +27,5 @@ sbin/flowd %%PORTEXAMPLES%%%%EXAMPLESDIR%%/wormsuspects.pl %%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/flowrrd %%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd +%%PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd @dirrm include/flowd |