Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2012 06:01:28 +0000 (UTC)
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r306417 - head/net-mgmt/flowd
Message-ID:  <201210260601.q9Q61SOC034841@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhale
Date: Fri Oct 26 06:01:27 2012
New Revision: 306417
URL: http://svn.freebsd.org/changeset/ports/306417

Log:
  - 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

Modified:
  head/net-mgmt/flowd/Makefile   (contents, props changed)
  head/net-mgmt/flowd/pkg-plist   (contents, props changed)

Modified: head/net-mgmt/flowd/Makefile
==============================================================================
--- head/net-mgmt/flowd/Makefile	Fri Oct 26 05:31:59 2012	(r306416)
+++ head/net-mgmt/flowd/Makefile	Fri Oct 26 06:01:27 2012	(r306417)
@@ -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

Modified: head/net-mgmt/flowd/pkg-plist
==============================================================================
--- head/net-mgmt/flowd/pkg-plist	Fri Oct 26 05:31:59 2012	(r306416)
+++ head/net-mgmt/flowd/pkg-plist	Fri Oct 26 06:01:27 2012	(r306417)
@@ -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



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