diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 93 |
1 files changed, 35 insertions, 58 deletions
@@ -1,72 +1,49 @@ -# $NetBSD: Makefile,v 1.1.1.2 2005/04/01 13:34:51 abs Exp $ +# $NetBSD: Makefile,v 1.1.1.3 2011/09/03 22:05:52 mjl Exp $ +# -DISTNAME= jakarta-tomcat-${TOMCAT_VERSION} -CATEGORIES= www java -# The list of sites to download is generated by a jakarta website. -# The getsite.sh script parses the HTML and extracts the urls. -DYNAMIC_MASTER_SITES=1 +DISTNAME= pgbouncer-${VERSION} +CATEGORIES= databases +MASTER_SITES= http://pgfoundry.org/frs/download.php/3085/ +EXTRACT_SUFX= .tgz -MAINTAINER= abs@NetBSD.org -HOMEPAGE= http://jakarta.apache.org/tomcat/ -COMMENT= The Apache Project's Java Servlet 2.4 and JSP 2.0 server +MAINTAINER= pkgsrc@NetBSD.org +HOMEPAGE= http://wiki.postgresql.org/wiki/PgBouncer +COMMENT= Lightweight connection pooler for PostgreSQL +LICENSE= original-bsd -TOMCAT_VERSION= 5.5.7 +PKG_DESTDIR_SUPPORT= user-destdir -# This needs java 1.4 or higher. -USE_JAVA2= yes -USE_BUILDLINK3= yes +VERSION= 1.4.2 +USE_LANGUAGES= c +USE_TOOLS= gmake +GNU_CONFIGURE= yes -TOMCAT_LIB= ${PREFIX}/tomcat -CATALINA_DIR= Catalina/localhost +CONFIGURE_ARGS+= --with-libevent=${BUILDLINK_PREFIX.libevent} -EGDIR= ${TOMCAT_LIB}/share/examples/jakarta-tomcat -EGDIR2= ${EGDIR}/${CATALINA_DIR} +EGDIR= ${PREFIX}/share/examples/${PKGBASE} +CONF_FILES= ${EGDIR}/pgbouncer.ini ${PKG_SYSCONFDIR}/pgbouncer.ini \ + ${EGDIR}/pgbouncer.userlist ${PKG_SYSCONFDIR}/pgbouncer.userlist -# Work around a horrible interaction with the gzip in NetBSD 2.0 (at least RC4) -# If gzip is used in a pipeline the tarfile fails to extract. PR bin/27228 -EXTRACT_CMD= ${CP} ${DOWNLOADED_DISTFILE} ${WRKDIR}/tar.gz && ${GZIP_CMD} -d ${WRKDIR}/tar.gz && ${TAR} xf ${WRKDIR}/tar +RCD_SCRIPTS+= pgbouncer -PKG_SYSCONFDIR.jakarta-tomcat55= ${TOMCAT_LIB}/conf -MAKE_DIRS= ${PKG_SYSCONFDIR.jakarta-tomcat55}/${CATALINA_DIR} +INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${EGDIR} -USE_PKGINSTALL= yes -RCD_SCRIPTS= tomcat -CFILES= server.xml web.xml tomcat-users.xml -CFILES+= catalina.policy catalina.properties jk2.properties -CF2FILES= manager.xml +PGUSER?= pgsql +PGGROUP?= pgsql +PKG_GROUPS= ${PGGROUP} +PKG_USERS= ${PGUSER}:${PGGROUP} -CONF_FILES= # empty -.for f in ${CFILES} -CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} -.endfor -.undef f -.for f in ${CF2FILES} -CONF_FILES+= ${EGDIR2}/${f} ${PKG_SYSCONFDIR}/${CATALINA_DIR}/${f} -.endfor -.undef f +BUILD_DEFS+= PGUSER PGGROUP +FILES_SUBST+= PGUSER=${PGUSER} -FILES_SUBST+= JAVA_HOME=${PKG_JVM_HOME} TOMCAT_LIB=${TOMCAT_LIB} - -do-build: - @${MV} ${WRKSRC}/conf ${WRKDIR} do-install: - ${INSTALL_DATA_DIR} ${EGDIR2} -.for f in ${CFILES} - ${INSTALL_DATA} ${WRKDIR}/conf/${f} ${EGDIR} -.endfor -.undef f -.for f in ${CF2FILES} - ${INSTALL_DATA} ${WRKDIR}/conf/${CATALINA_DIR}/${f} ${EGDIR2} -.endfor -.undef f - ${INSTALL_DATA_DIR} ${TOMCAT_LIB} - @(cd ${WRKSRC} && ${PAX} -rw -pm . ${TOMCAT_LIB}; \ - ${FIND} ${TOMCAT_LIB} -type f -print | ${XARGS} ${CHMOD} a+r; \ - ${FIND} ${TOMCAT_LIB} \( -type f -o -perm -u+x \) -print \ - | ${XARGS} ${CHMOD} a+rx; \ - ${FIND} ${TOMCAT_LIB} -type d -print | ${XARGS} ${CHMOD} a+rx; \ - ${FIND} ${TOMCAT_LIB} -type f -name \*.bat -print | \ - ${XARGS} ${RM} -f) + ${INSTALL_PROGRAM} ${WRKSRC}/pgbouncer ${DESTDIR}${PREFIX}/bin/ + ${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ + ${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/ + ${INSTALL_DATA} ${WRKSRC}/etc/pgbouncer.ini ${DESTDIR}${EGDIR} + ${INSTALL_DATA} ${WRKSRC}/etc/userlist.txt ${DESTDIR}${EGDIR}/pgbouncer.userlist + +BUILDLINK_API_DEPENDS.libevent+= libevent>=2.0 +.include "../../devel/libevent/buildlink3.mk" -.include "../../mk/java-vm.mk" .include "../../mk/bsd.pkg.mk" |