diff options
-rw-r--r-- | dev-db/pgpool2/Manifest | 5 | ||||
-rw-r--r-- | dev-db/pgpool2/files/pgpool2-tmpdir.patch | 56 | ||||
-rw-r--r-- | dev-db/pgpool2/files/pgpool2.initd | 28 | ||||
-rw-r--r-- | dev-db/pgpool2/metadata.xml | 5 | ||||
-rw-r--r-- | dev-db/pgpool2/pgpool2-3.0.1.ebuild | 63 |
5 files changed, 157 insertions, 0 deletions
diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest new file mode 100644 index 0000000..46532f5 --- /dev/null +++ b/dev-db/pgpool2/Manifest @@ -0,0 +1,5 @@ +AUX pgpool2-tmpdir.patch 1806 RMD160 cfe4b124726f612953152c7cc40d028d8fef7800 SHA1 2dafdc37a24318b99bcdf8f983f12d048d8fd7f0 SHA256 431996a2d2e9acf99511c0315b51e478809b3b16818aefaf17bd9cb228975f2d +AUX pgpool2.initd 563 RMD160 ac3d50f4a90b6b69bf98ae73a55f4a34d5a30081 SHA1 5d7eced2cbd1a1f1149466ee398e28c774f26d15 SHA256 f8702c560b31110ea1a6581cfe37fe7b5b2fbe8af0188ace0b75e39a0e694aee +DIST pgpool-II-3.0.1.tar.gz 1226151 RMD160 3fa36d1d1d7c66dc6d291ba14905feb01342eb17 SHA1 1c72a271d65bd7b44b473b5020746808a056bf3d SHA256 3adfa1f92dee238abec2dd6880985da99b1e2d862e567994e9e2f2736a872ae0 +EBUILD pgpool2-3.0.1.ebuild 1213 RMD160 69c7c3fb32cbc925826bdb334183b8eb28eec9ea SHA1 02069533be95e0411bedf0246f35b3fe9374e8be SHA256 2219de2e46e5876d9f4e5e114291b36501b868bda41e1642e2991270d35ada5d +MISC metadata.xml 164 RMD160 becfe652663bd65719dd11fa6ffb588b3d5b4ecc SHA1 f67b7ac1c5e6e65ef5a19a589d4759c84918f86c SHA256 7e8e8126bc8701c4a42c7dfed8bb755ac6040fe3d0e3f994d888f8b2b4fa7d8b diff --git a/dev-db/pgpool2/files/pgpool2-tmpdir.patch b/dev-db/pgpool2/files/pgpool2-tmpdir.patch new file mode 100644 index 0000000..8a62327 --- /dev/null +++ b/dev-db/pgpool2/files/pgpool2-tmpdir.patch @@ -0,0 +1,56 @@ +diff -Nur pgpool-II-1.0.2/pgpool.conf.sample pgpool-II-1.0.2.new/pgpool.conf.sample +--- pgpool-II-1.0.2/pgpool.conf.sample 2006-11-29 22:54:26.000000000 +0100 ++++ pgpool-II-1.0.2.new/pgpool.conf.sample 2007-02-28 15:38:36.000000000 +0100 +@@ -7,21 +7,21 @@ + listen_addresses = 'localhost' + + # Port number for pgpool +-port = 9999 ++port = 5433 + + # Port number for pgpool communication manager + pcp_port = 9898 + + # Unix domain socket path. (The Debian package defaults to + # /var/run/postgresql.) +-socket_dir = '/tmp' ++socket_dir = '/var/run/postgresql' + + # Unix domain socket path for pgpool communication manager. + # (Debian package defaults to /var/run/postgresql) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '/var/run/postgresql' + + # Unix domain socket path for the backend. Debian package defaults to /var/run/postgresql! +-backend_socket_dir = '/tmp' ++backend_socket_dir = '/var/run/postgresql' + + # pgpool communication manager timeout. 0 means no timeout, but strongly not recommended! + pcp_timeout = 10 +@@ -43,8 +43,8 @@ + # 0 means no exit. + child_max_connections = 0 + +-# Logging directory +-logdir = '/tmp' ++# Logging directory (more accurately, the directory for the PID file) ++logdir = '/var/run/postgresql' + + # Replication mode + replication_mode = false +diff -Nur pgpool-II-1.0.2/pool.h pgpool-II-1.0.2.new/pool.h +--- pgpool-II-1.0.2/pool.h 2007-02-13 04:19:04.000000000 +0100 ++++ pgpool-II-1.0.2.new/pool.h 2007-02-28 15:39:07.000000000 +0100 +@@ -46,10 +46,10 @@ + #define PCP_PASSWD_FILE_NAME "pcp.conf" + + /* pid file directory */ +-#define DEFAULT_LOGDIR "/tmp" ++#define DEFAULT_LOGDIR "/var/run/postgresql" + + /* Unix domain socket directory */ +-#define DEFAULT_SOCKET_DIR "/tmp" ++#define DEFAULT_SOCKET_DIR "/var/run/postgresql" + + /* pid file name */ + #define PID_FILE_NAME "pgpool.pid" diff --git a/dev-db/pgpool2/files/pgpool2.initd b/dev-db/pgpool2/files/pgpool2.initd new file mode 100644 index 0000000..4d98b2e --- /dev/null +++ b/dev-db/pgpool2/files/pgpool2.initd @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net +} + +OPTS="-f /etc/pgpool2/pgpool.conf -a /etc/pgpool2/pool_hba.conf -F /etc/pgpool2/pcp.conf -n" + +start() { + ebegin "Starting pgpool2" + start-stop-daemon --start --quiet --background --exec /usr/bin/pgpool -- ${OPTS} > /var/log/pgpool/pgpool.log 2>&1 + eend $? +} + +stop() { + ebegin "Stopping pgpool2" + start-stop-daemon --stop --quiet --exec /usr/bin/pgpool + eend $? +} + +restart() { + stop + sleep 3 + start +} diff --git a/dev-db/pgpool2/metadata.xml b/dev-db/pgpool2/metadata.xml new file mode 100644 index 0000000..d06e452 --- /dev/null +++ b/dev-db/pgpool2/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> +</pkgmetadata> diff --git a/dev-db/pgpool2/pgpool2-3.0.1.ebuild b/dev-db/pgpool2/pgpool2-3.0.1.ebuild new file mode 100644 index 0000000..43faa9e --- /dev/null +++ b/dev-db/pgpool2/pgpool2-3.0.1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +inherit autotools-utils + +MY_P="${PN/2/-II}-${PV}" + +DESCRIPTION="Connection pool server for PostgreSQL" +HOMEPAGE="http://pgpool.projects.postgresql.org/" +SRC_URI="http://pgfoundry.org/frs/download.php/2841/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="pam ssl static-libs" + +RDEPEND=" + dev-db/postgresql-base + pam? ( sys-auth/pambase ) + ssl? ( dev-libs/openssl ) +" +DEPEND="${DEPEND} + sys-devel/bison" + +AUTOTOOLS_IN_SOURCE_BUILD="1" + +PATCHES=( + "${FILESDIR}/${PN}-tmpdir.patch" +) + +DOCS=( + "NEWS" + "doc/where_to_send_queries.pdf" +) +HTML_DOCS=( + "doc/pgpool-en.html" "doc/pgpool.css" + "doc/tutorial-en.html" +) + +S=${WORKDIR}/${MY_P} + +src_configure() { + local myeconfargs=( + "--sysconfdir=${EROOT}/etc/${PN}" + "--disable-dependency-tracking" + "--disable-rpath" + $(use_with ssl openssl) + $(use_with pam) + ) + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install + remove_libtool_files all + # move misc data to proper folder + mv "${ED}/usr/share/${PN/2/-II}" "${ED}/usr/share/${PN}" || die + + newinitd "${FILESDIR}/${PN}.initd" ${PN} || die +} |