diff options
author | Aaron Swenson <titanofold@gentoo.org> | 2011-11-16 04:17:37 +0000 |
---|---|---|
committer | Aaron Swenson <titanofold@gentoo.org> | 2011-11-16 04:17:37 +0000 |
commit | 7470a7f1e93bfc9e85cd1b537af537eaee7161d8 (patch) | |
tree | 5d178748b4f2cfe0ba332b9a4767c98e2f58ed20 /dev-db/pgbouncer | |
parent | New snapshot (diff) | |
download | historical-7470a7f1e93bfc9e85cd1b537af537eaee7161d8.tar.gz historical-7470a7f1e93bfc9e85cd1b537af537eaee7161d8.tar.bz2 historical-7470a7f1e93bfc9e85cd1b537af537eaee7161d8.zip |
Initial commit. Ebuild written by Johan Bergström <bugs@bergstroem.nu>. Fixes bug 243232.
Package-Manager: portage-2.1.10.11/cvs/Linux i686
Diffstat (limited to 'dev-db/pgbouncer')
-rw-r--r-- | dev-db/pgbouncer/ChangeLog | 11 | ||||
-rw-r--r-- | dev-db/pgbouncer/Manifest | 15 | ||||
-rw-r--r-- | dev-db/pgbouncer/files/pgbouncer.initd | 37 | ||||
-rw-r--r-- | dev-db/pgbouncer/metadata.xml | 14 | ||||
-rw-r--r-- | dev-db/pgbouncer/pgbouncer-1.4.2.ebuild | 71 |
5 files changed, 148 insertions, 0 deletions
diff --git a/dev-db/pgbouncer/ChangeLog b/dev-db/pgbouncer/ChangeLog new file mode 100644 index 000000000000..6291bd0f0c20 --- /dev/null +++ b/dev-db/pgbouncer/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-db/pgbouncer +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/pgbouncer/ChangeLog,v 1.1 2011/11/16 04:17:36 titanofold Exp $ + +*pgbouncer-1.4.2 (16 Nov 2011) + + 16 Nov 2011; Aaron W. Swenson <titanofold@gentoo.org> + +pgbouncer-1.4.2.ebuild, +files/pgbouncer.initd, +metadata.xml: + Initial commit. Ebuild written by Johan Bergström <bugs@bergstroem.nu>. + Fixes bug 243232. + diff --git a/dev-db/pgbouncer/Manifest b/dev-db/pgbouncer/Manifest new file mode 100644 index 000000000000..8a2a948659c0 --- /dev/null +++ b/dev-db/pgbouncer/Manifest @@ -0,0 +1,15 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX pgbouncer.initd 712 RMD160 aebf2c6b125f3cb9862e995dfaf4f63d0d97b87e SHA1 9e95aeaba94c0ffe98d1a208e9845ac77cc2df6d SHA256 759317a7e60fc4f69faaec5f8bd6348f84203bae3f1319db99ec70b4c46f2ad5 +DIST pgbouncer-1.4.2.tgz 283204 RMD160 055796e23dd7029d3f4a2c882cf24399a5481cb1 SHA1 610198c3f2186d70267275f554e23bd43598e4b5 SHA256 e9916f08621f8ad4134840049a41783fa93d056905d445942f8aa1d2e5aa1eae +EBUILD pgbouncer-1.4.2.ebuild 1762 RMD160 c734c9a76b1badde767838116aa95c54d81835b8 SHA1 67feed0971ed3a1045bbc4d1d1c9b2a12b23fb90 SHA256 c352e171045cb38644be32f0bf4f1afab7ba152dd08d99943fe1245bec0394b8 +MISC ChangeLog 459 RMD160 11b9fc7d8a002a904ebd41e357929dfaacf92f0e SHA1 dbd49132d9de4e24b10b6a216d809690a1909127 SHA256 f73fab74d0287e5f6af9ed7bfeea67c09e204bb99caff67ed25a9320007e9bd8 +MISC metadata.xml 420 RMD160 a9fa523e47ccc238079842bd43c081054c9a7b3d SHA1 5a3af08f491bbd0bfecadcc69a2664216769a461 SHA256 4a0159794fd372690f08474ea2955191b42b0f558def87ff02e77b04db13161a +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iF4EAREIAAYFAk7DOWYACgkQVxOqA9G7/aCk1QD+NY12g1TPpjDe93P5rzgiATAt +2kcieiTdmk2hAY2+3VYA/1SzWxcXy7T6EZneOx4Nd8rQ+igVMRGM65E5kcJ38Rgn +=KRPQ +-----END PGP SIGNATURE----- diff --git a/dev-db/pgbouncer/files/pgbouncer.initd b/dev-db/pgbouncer/files/pgbouncer.initd new file mode 100644 index 000000000000..b5cb52b62382 --- /dev/null +++ b/dev-db/pgbouncer/files/pgbouncer.initd @@ -0,0 +1,37 @@ +#!/sbin/runscript + +extra_started_commands="reload" + +if [ -d /run ] ; then + RUNDIR=/run/pgbouncer +else + RUNDIR=/var/run/pgbouncer +fi + +depend() { + need net + after postgresql +} + +start() { + mkdir -p ${RUNDIR} + chown pgbouncer:pgbouncer ${RUNDIR} + + ebegin "Starting pgbouncer" + start-stop-daemon --start --pidfile ${RUNDIR}/pgbouncer.pid \ + --exec /usr/bin/pgbouncer -- -q -d -u pgbouncer /etc/pgbouncer.conf + eend $? "Failed to start pgbouncer" +} + +stop() { + ebegin "Stopping pgbouncer" + start-stop-daemon --stop --quiet --pidfile ${RUNDIR}/pgbouncer.pid + eend $? +} + +reload() { + ebegin "Gracefully reloading pgbouncer" + start-stop-daemon --stop --oknodo --signal HUP \ + --pidfile ${RUNDIR}/pgbouncer.pid + eend $? +} diff --git a/dev-db/pgbouncer/metadata.xml b/dev-db/pgbouncer/metadata.xml new file mode 100644 index 000000000000..f1079c73f7ab --- /dev/null +++ b/dev-db/pgbouncer/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <maintainer> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + <description>Proxy-Maintainer, assign bugs</description> + </maintainer> + <maintainer> + <email>titanofold@gentoo.org</email> + <name>Aaron W. Swenson</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/pgbouncer/pgbouncer-1.4.2.ebuild b/dev-db/pgbouncer/pgbouncer-1.4.2.ebuild new file mode 100644 index 000000000000..c898e5ff0bf6 --- /dev/null +++ b/dev-db/pgbouncer/pgbouncer-1.4.2.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/pgbouncer/pgbouncer-1.4.2.ebuild,v 1.1 2011/11/16 04:17:36 titanofold Exp $ + +EAPI="4" + +inherit eutils + +RESTRICT="test" + +DESCRIPTION="Lightweight connection pooler for PostgreSQL" +HOMEPAGE="http://pgfoundry.org/projects/pgbouncer/" +SRC_URI="mirror://postgresql/projects/pgFoundry/${PN}/${P}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug" + +DEPEND="dev-libs/libevent" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup pgbouncer + enewuser pgbouncer -1 -1 -1 pgbouncer +} + +src_prepare() { + local rundir="" + [[ ! -d /run ]] && rundir="/var" + + sed -i -e "s,${PN}.log,/var/log/${PN}/${PN}.log," \ + -e "s,${PN}.pid,/var/run/${PN}/${PN}.pid," \ + -e "s,etc/userlist.txt,/etc/userlist.txt," \ + -e "s,;unix_socket_dir = /tmp,unix_socket_dir = ${rundir}/run/${PN}.sock," \ + "${S}"/etc/pgbouncer.ini || die +} + +src_configure() { + # --enable-debug is only used to disable stripping + econf \ + --enable-debug \ + $(use_enable debug cassert) \ + --docdir=/usr/share/doc/${PF} +} + +src_install() { + emake DESTDIR="${D}" install + + insinto /etc + newins etc/pgbouncer.ini pgbouncer.conf + newinitd "${FILESDIR}"/pgbouncer.initd "${PN}" + + dodoc README NEWS AUTHORS + dodoc doc/*.txt + + dodir /var/log/pgbouncer/ + fowners pgbouncer:pgbouncer /var/log/pgbouncer/ +} + +pkg_postinst() { + einfo "Please read the config.txt for Configuration Directives" + einfo + einfo "For Administration Commands, see:" + einfo " man pgbouncer" + einfo + einfo "By default, PgBouncer does not have access to any database." + einfo "GRANT the permissions needed for your application and make sure that it" + einfo "exists in PgBouncer's auth_file." + +} |