1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00
freebsd-ports/databases/pgbouncer/Makefile
Mathieu Arnold 4e1b79a0a6 Remove ${PORTSDIR}/ from dependencies, categories d, e, f, and g.
With hat:	portmgr
Sponsored by:	Absolight
2016-04-01 14:00:51 +00:00

69 lines
1.9 KiB
Makefile

# Created by: Sergey Skvortsov <skv@protey.ru>
# $FreeBSD$
PORTNAME= pgbouncer
PORTVERSION= 1.7.2
CATEGORIES= databases
MASTER_SITES= https://pgbouncer.github.io/downloads/files/${PORTVERSION}/ \
http://pgbouncer.github.io/downloads/files/${PORTVERSION}/
MAINTAINER= m.tsatsenko@gmail.com
COMMENT= Lightweight connection pooler for PostgreSQL
LICENSE= BSD2CLAUSE
LIB_DEPENDS= libevent.so:devel/libevent2
BUILD_DEPENDS+= ${LOCALBASE}/bin/gsed:textproc/gsed
PORTSCOUT= site:https://pgbouncer.github.io/downloads/
USERS= pgbouncer
GROUPS= pgbouncer
USE_RC_SUBR= pgbouncer
GNU_CONFIGURE= yes
USES= gmake
USE_OPENSSL= yes
CONFIGURE_ARGS= --with-libevent=${LOCALBASE} --enable-evdns
CONFIGURE_ENV+= PTHREAD_LIBS="-lpthread"
PGBOUNCER_USER?= pgbouncer
PGBOUNCER_GROUP?= pgbouncer
PGBOUNCER_RUNDIR?= /var/run/pgbouncer
PGBOUNCER_LOGDIR?= /var/log/pgbouncer
PLIST_SUB+= PGBOUNCER_USER="${USERS}" \
PGBOUNCER_GROUP="${GROUPS}" \
PGBOUNCER_LOGDIR="${PGBOUNCER_LOGDIR}" \
PGBOUNCER_RUNDIR="${PGBOUNCER_RUNDIR}"
SUB_LIST+= PGBOUNCER_RUNDIR="${PGBOUNCER_RUNDIR}"
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
WITH_OPENSSL_PORT= yes
.endif
post-patch:
@${REINPLACE_CMD} -e "s|= pgbouncer.log|= ${PGBOUNCER_LOGDIR}/pgbouncer.log|g" \
-e "s|= pgbouncer.pid|= ${PGBOUNCER_RUNDIR}/pgbouncer.pid|g" \
${WRKSRC}/etc/pgbouncer.ini
@${REINPLACE_CMD} -e "s|sed -n|${LOCALBASE}/bin/gsed -n|g" \
${WRKSRC}/lib/find_modules.sh
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pgbouncer ${STAGEDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.1 ${STAGEDIR}${PREFIX}/man/man1/
${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.5 ${STAGEDIR}${PREFIX}/man/man5/
${INSTALL_DATA} ${WRKSRC}/etc/pgbouncer.ini \
${STAGEDIR}${PREFIX}/etc/pgbouncer.ini.sample
${INSTALL_DATA} ${WRKSRC}/etc/userlist.txt \
${STAGEDIR}${PREFIX}/etc/pgbouncer.users.sample
@${MKDIR} ${STAGEDIR}${PGBOUNCER_RUNDIR} \
${STAGEDIR}${PGBOUNCER_LOGDIR}
.include <bsd.port.mk>