Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 May 2014 12:23:00 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r355161 - in head/databases/pgbouncer: . files
Message-ID:  <201405251223.s4PCN0J5023798@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Sun May 25 12:23:00 2014
New Revision: 355161
URL: http://svnweb.freebsd.org/changeset/ports/355161
QAT: https://qat.redports.org/buildarchive/r355161/

Log:
  - Add STAGE support
  - Depend on xmlto to generate man pages. Add DOCS option
  
  PR:		ports/189787
  Submitted by:	"Mikhail T." <m.tsatsenko@gmail.com> (maintainer)

Deleted:
  head/databases/pgbouncer/files/pkg-deinstall.in
  head/databases/pgbouncer/files/pkg-install.in
Modified:
  head/databases/pgbouncer/Makefile
  head/databases/pgbouncer/pkg-plist

Modified: head/databases/pgbouncer/Makefile
==============================================================================
--- head/databases/pgbouncer/Makefile	Sun May 25 12:20:49 2014	(r355160)
+++ head/databases/pgbouncer/Makefile	Sun May 25 12:23:00 2014	(r355161)
@@ -10,34 +10,32 @@ MASTER_SITES=	http://pgfoundry.org/frs/d
 MAINTAINER=	m.tsatsenko@gmail.com
 COMMENT=	Lightweight connection pooler for PostgreSQL
 
-LICENSE=	BSD
+LICENSE=	BSD2CLAUSE
 
 LIB_DEPENDS=	libevent-2.0.so:${PORTSDIR}/devel/libevent2
 
+OPTIONS_DEFINE=	DOCS
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+BUILD_DEPENDS+=	xmlto:${PORTSDIR}/textproc/xmlto
+.endif
+
 PORTSCOUT=	site:http://pgfoundry.org/frs/?group_id=1000258
 
 USERS=		pgbouncer
 GROUPS=		pgbouncer
 
 USE_RC_SUBR=	pgbouncer
-SUB_FILES=	pkg-message pkg-install pkg-deinstall
 
 GNU_CONFIGURE=	yes
-USE_GMAKE=	yes
-
-.if ! defined(NO_INSTALL_MANPAGES)
-MAN1=		pgbouncer.1
-MAN5=		pgbouncer.5
-.endif
+USES=		gmake
 
 CONFIGURE_ARGS=	--with-libevent=${LOCALBASE} --enable-evdns
 CONFIGURE_ENV+=	PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \
 		PTHREAD_LIBS=${PTHREAD_LIBS}
 
-PKGINSTALL=	${WRKDIR}/pkg-install
-PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
-PKGMESSAGE=	${WRKDIR}/pkg-message
-
 PGBOUNCER_USER?=	pgbouncer
 PGBOUNCER_GROUP?=	pgbouncer
 
@@ -46,14 +44,12 @@ PGBOUNCER_LOGDIR?=	/var/log/pgbouncer
 
 BUILD_DEPENDS+=		${LOCALBASE}/bin/gsed:${PORTSDIR}/textproc/gsed
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 SUB_LIST+=	PGBOUNCER_USER="${USERS}" \
 		PGBOUNCER_GROUP="${GROUPS}" \
 		PGBOUNCER_LOGDIR="${PGBOUNCER_LOGDIR}" \
-		PGBOUNCER_RUNDIR="${PGBOUNCER_RUNDIR}" \
-		CHMOD="${CHMOD}" CHOWN="${CHOWN}" MKDIR="${MKDIR}" PW="${PW}"
+		PGBOUNCER_RUNDIR="${PGBOUNCER_RUNDIR}"
 
 post-patch:
 	@${REINPLACE_CMD} -e "s|= pgbouncer.log|= ${PGBOUNCER_LOGDIR}/pgbouncer.log|g" \
@@ -62,20 +58,17 @@ post-patch:
 	@${REINPLACE_CMD} -e "s|sed -n|${LOCALBASE}/bin/gsed -n|g" \
 		${WRKSRC}/lib/find_modules.sh
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/pgbouncer ${PREFIX}/bin/
-.if ! defined(NO_INSTALL_MANPAGES)
-	${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.1 ${PREFIX}/man/man1/
-	${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.5 ${PREFIX}/man/man5/
+.if empty(PORT_OPTIONS:MDOCS)
+	${REINPLACE_CMD} -e "s| = doc| = |g" ${WRKSRC}/Makefile
 .endif
-	${INSTALL_DATA} ${WRKSRC}/etc/pgbouncer.ini ${PREFIX}/etc/pgbouncer.ini.sample
-	${INSTALL_DATA} ${WRKSRC}/etc/userlist.txt ${PREFIX}/etc/pgbouncer.users.sample
 
-post-install:
-	@if [ ! -f ${PREFIX}/etc/pgbouncer.ini ]; then \
-		${CP} -p ${PREFIX}/etc/pgbouncer.ini.sample ${PREFIX}/etc/pgbouncer.ini ; \
-	fi
-	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-	@${CAT} ${PKGMESSAGE}
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/pgbouncer ${STAGEDIR}${PREFIX}/bin/
+.if ${PORT_OPTIONS:MDOCS}
+	${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.1 ${STAGEDIR}${PREFIX}/man/man1/
+	${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.5 ${STAGEDIR}${PREFIX}/man/man5/
+.endif
+	${INSTALL_DATA} ${WRKSRC}/etc/pgbouncer.ini ${STAGEDIR}${PREFIX}/etc/pgbouncer.ini.sample
+	${INSTALL_DATA} ${WRKSRC}/etc/userlist.txt ${STAGEDIR}${PREFIX}/etc/pgbouncer.users.sample
 
 .include <bsd.port.post.mk>

Modified: head/databases/pgbouncer/pkg-plist
==============================================================================
--- head/databases/pgbouncer/pkg-plist	Sun May 25 12:20:49 2014	(r355160)
+++ head/databases/pgbouncer/pkg-plist	Sun May 25 12:23:00 2014	(r355161)
@@ -1,5 +1,11 @@
 bin/pgbouncer
-@unexec if cmp -s %D/etc/pgbouncer.ini %D/etc/pgbouncer.ini.sample; then rm -f %D/etc/pgbouncer.ini; fi
-etc/pgbouncer.ini.sample
-@exec [ -f %B/pgbouncer.ini ] || cp %B/%f %B/pgbouncer.ini
-etc/pgbouncer.users.sample
+man/man1/pgbouncer.1.gz
+man/man5/pgbouncer.5.gz
+@sample etc/pgbouncer.ini.sample
+@sample etc/pgbouncer.users.sample
+@exec [ -d %%PGBOUNCER_LOGDIR%% ] || mkdir -p %%PGBOUNCER_LOGDIR%%
+@exec chown %%PGBOUNCER_USER%%:%%PGBOUNCER_GROUP%% %%PGBOUNCER_LOGDIR%%
+@unexec if [ -z ${UPGRADE_PORT} ] ; then rmdir %%PGBOUNCER_LOGDIR%% 2>/dev/null; fi
+@exec [ -d %%PGBOUNCER_RUNDIR%% ] || mkdir -p %%PGBOUNCER_RUNDIR%%
+@exec chown %%PGBOUNCER_USER%%:%%PGBOUNCER_GROUP%% %%PGBOUNCER_RUNDIR%%
+@unexec if [ -z ${UPGRADE_PORT} ] ; then rmdir %%PGBOUNCER_RUNDIR%% 2>/dev/null; fi



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