diff --git a/databases/pgpool/Makefile b/databases/pgpool/Makefile new file mode 100644 index 00000000000..df7480222ae --- /dev/null +++ b/databases/pgpool/Makefile @@ -0,0 +1,42 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $ + +COMMENT= connection pool server for PostgreSQL + +DISTNAME= pgpool-II-3.1 + +CATEGORIES= databases + +HOMEPAGE= http://www.pgpool.net/ + +MAINTAINER= Pierre-Emmanuel Andre + +SHARED_LIBS= pcp 0.0 + +# BSD +PERMIT_PACKAGE_FTP= Yes +PERMIT_PACKAGE_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes + +MASTER_SITES= http://pgfoundry.org/frs/download.php/3114/ + +WANTLIB= c crypto m pq ssl + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS= --with-openssl + +USE_GMAKE= Yes +FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/pgpool-II/ + +BUILD_DEPENDS = databases/postgresql,-server +LIB_DEPENDS = databases/postgresql + +post-install: + @cd ${WRKSRC}/sql/pgpool-regclass && \ + env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \ + -f ${MAKE_FILE} ${ALL_TARGET} && \ + env -i ${MAKE_ENV} \ + PREFIX=${WRKINST}${PREFIX} ${DESTDIRNAME}=${WRKINST} TRUEPREFIX=${PREFIX} \ + ${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f ${MAKE_FILE} ${FAKE_TARGET} + +.include diff --git a/databases/pgpool/distinfo b/databases/pgpool/distinfo new file mode 100644 index 00000000000..7840bd9db31 --- /dev/null +++ b/databases/pgpool/distinfo @@ -0,0 +1,5 @@ +MD5 (pgpool-II-3.1.tar.gz) = 27WRqKo8O9HmifQadji57g== +RMD160 (pgpool-II-3.1.tar.gz) = 1MV3TLmM4JZy7QFLcmn0qKgDteU= +SHA1 (pgpool-II-3.1.tar.gz) = amyXLFsBMTv2cG4+vw2wLyUPmJA= +SHA256 (pgpool-II-3.1.tar.gz) = dCEUzqnSur8cMw3VBQ7NI9mpvlPr48vYcUJ2LoqOqUA= +SIZE (pgpool-II-3.1.tar.gz) = 1354418 diff --git a/databases/pgpool/patches/patch-pool_lobj_c b/databases/pgpool/patches/patch-pool_lobj_c new file mode 100644 index 00000000000..018c06dd2b2 --- /dev/null +++ b/databases/pgpool/patches/patch-pool_lobj_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-pool_lobj_c,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $ +--- pool_lobj.c.orig Thu Nov 24 15:43:49 2011 ++++ pool_lobj.c Thu Nov 24 15:44:02 2011 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + #include "pool.h" + #include "pool_lobj.h" diff --git a/databases/pgpool/pkg/DESCR b/databases/pgpool/pkg/DESCR new file mode 100644 index 00000000000..59be4861f30 --- /dev/null +++ b/databases/pgpool/pkg/DESCR @@ -0,0 +1,8 @@ +pgpool-II is a middleware that sits between PostgreSQL servers and a +PostgreSQL database client. It provides the following features: + ++ Connection Pooling ++ Replication ++ Load Balance ++ Limiting Exceeding Connections ++ Parallel Query diff --git a/databases/pgpool/pkg/PFRAG.shared b/databases/pgpool/pkg/PFRAG.shared new file mode 100644 index 00000000000..1b279cb756e --- /dev/null +++ b/databases/pgpool/pkg/PFRAG.shared @@ -0,0 +1,3 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $ +@lib lib/libpcp.so.${LIBpcp_VERSION} +lib/postgresql/pgpool-regclass.so diff --git a/databases/pgpool/pkg/PLIST b/databases/pgpool/pkg/PLIST new file mode 100644 index 00000000000..deb98f165a3 --- /dev/null +++ b/databases/pgpool/pkg/PLIST @@ -0,0 +1,44 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $ +@newgroup _pgpool:690 +@newuser _pgpool:690:_pgpool:daemon:pgpool daemon:/nonexistent:/sbin/nologin +%%SHARED%% +@bin bin/pcp_attach_node +@bin bin/pcp_detach_node +@bin bin/pcp_node_count +@bin bin/pcp_node_info +@bin bin/pcp_pool_status +@bin bin/pcp_proc_count +@bin bin/pcp_proc_info +@bin bin/pcp_promote_node +@bin bin/pcp_recovery_node +@bin bin/pcp_stop_pgpool +@bin bin/pcp_systemdb_info +@bin bin/pg_md5 +@bin bin/pgpool +include/libpcp_ext.h +include/pcp.h +include/pool_process_reporting.h +include/pool_type.h +lib/libpcp.a +lib/libpcp.la +lib/postgresql/ +@man man/man8/pgpool.8 +share/examples/pgpool-II/ +share/examples/pgpool-II/pcp.conf.sample +@sample ${SYSCONFDIR}/pcp.conf +share/examples/pgpool-II/pgpool.conf.sample +@sample ${SYSCONFDIR}/pgpool.conf +share/examples/pgpool-II/pgpool.conf.sample-master-slave +share/examples/pgpool-II/pgpool.conf.sample-replication +share/examples/pgpool-II/pgpool.conf.sample-stream +share/examples/pgpool-II/pool_hba.conf.sample +@sample ${SYSCONFDIR}/pool_hba.conf +share/pgpool-II/ +share/pgpool-II/insert_lock.sql +share/pgpool-II/pgpool.pam +share/pgpool-II/system_db.sql +share/postgresql/ +share/postgresql/contrib/ +share/postgresql/contrib/pgpool-regclass.sql +share/postgresql/contrib/uninstall_pgpool-regclass.sql +@rcscript ${RCDIR}/pgpool diff --git a/databases/pgpool/pkg/pgpool.rc b/databases/pgpool/pkg/pgpool.rc new file mode 100644 index 00000000000..248fc4001e8 --- /dev/null +++ b/databases/pgpool/pkg/pgpool.rc @@ -0,0 +1,22 @@ +#!/bin/sh +# +# $OpenBSD: pgpool.rc,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $ + +daemon="${TRUEPREFIX}/bin/pgpool" +daemon_user="_pgpool" + +. /etc/rc.d/rc.subr + +rc_pre() { + /usr/bin/install -d -o _pgpool /var/run/pgpool +} + +rc_stop() { + ${daemon} -m s stop || ${daemon} -m f stop +} + +rc_reload() { + ${daemon} reload +} + +rc_cmd $1