Gentoo Archives: gentoo-commits

From: Patrick Lauer <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/pgpool2/
Date: Sun, 28 Feb 2016 20:18:06
Message-Id: 1456690619.a7cda3201d7148a07717613419fe2a343904736d.patrick@gentoo
1 commit: a7cda3201d7148a07717613419fe2a343904736d
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 28 20:13:03 2016 +0000
4 Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 28 20:16:59 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7cda320
7
8 dev-db/pgpool2: Bump
9
10 Package-Manager: portage-2.2.27
11
12 dev-db/pgpool2/Manifest | 1 +
13 dev-db/pgpool2/pgpool2-3.3.8.ebuild | 108 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 109 insertions(+)
15
16 diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest
17 index cbaabe7..80902c2 100644
18 --- a/dev-db/pgpool2/Manifest
19 +++ b/dev-db/pgpool2/Manifest
20 @@ -1,3 +1,4 @@
21 DIST pgpool-II-3.2.5.tar.gz 1643267 SHA256 aecac952fd3d292584c9aa359d72f89b144c29f45c9f848cb030e46215a814f7 SHA512 c6dd033462de7f56724f7416fca3ee3e25835f113604fb03b97deee2e3ab25a07cfd9aea33ec36211aa0ec41c2bcea31ca9befe0cfe8f6389a39c2f6495388b6 WHIRLPOOL 5db077d51c5aa8692ba23c0f5ad3b3291c42448724cf633db13850d9b22df256c2aedc15b95fe74a33e486e09f4cc6a37daed0d39becff38acd40fa52b78ab8d
22 DIST pgpool-II-3.3.6.tar.gz 1812394 SHA256 8e0a9829122ed96793b4c340799d62778eb4176ee0f93288d8d4100fc620ff0e SHA512 64edf6ee96fc18bccaf72e79dc165318587da49f45f7d9748e051a9b87f1938b79eefc020a70f1be31fdf922e6d646710105d97961aef1e0c1538b29cdb0575c WHIRLPOOL a4bfc20115e3a17474e9d57c5abec48ca613568f9e5dcea171a39a114dc5ef3ad59ecd7fba4f0cad703bf6f3dcf7fb1d9dea7b30faa818403bf450f8df10a7c3
23 DIST pgpool-II-3.3.7.tar.gz 1808677 SHA256 b1bfc8c48be252f6c4e54521d24a0e28e86d0027b18aa4ccf6b8405508319032 SHA512 814f8a59ed8488a3ab049cc31ee4579ec954672f4cbca9102d8aa4d18dd2c169fd16518461cbcab24c28394c629234c54d9799d6df9f3ffdf0c57c56dfb2d094 WHIRLPOOL b8ca5e6689d1ac947b2da45c601c3206653b9ae5a181bd63f667a3df6ceecc012621ba4349671caa2e0d1ad371409e046b278e9a6b558786aa7ceed6583ccd9f
24 +DIST pgpool-II-3.3.8.tar.gz 1809180 SHA256 660c8b0c6e8be3d0f1120f2a648d08d4f9de1635dba9734d08ab912347675a4b SHA512 afaf4a74da3dc65cff9dedfcdd4f73e13b45f956e5252e6c2e930956bc9308f6a7c0e40d8b1fc0952a87a015c1bd1c7933f3a11cc366a20f3465537d47d24c32 WHIRLPOOL e359290e4beff0cb5ba45ade6ec4361c44182eeb8aae73116f97a07b10ecd06c3e237a15a6d917cddac22ebb7beacd5e1e59645f682016a5ca2f21c9793ac37e
25
26 diff --git a/dev-db/pgpool2/pgpool2-3.3.8.ebuild b/dev-db/pgpool2/pgpool2-3.3.8.ebuild
27 new file mode 100644
28 index 0000000..c2cff65
29 --- /dev/null
30 +++ b/dev-db/pgpool2/pgpool2-3.3.8.ebuild
31 @@ -0,0 +1,108 @@
32 +# Copyright 1999-2015 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=5
37 +
38 +MY_P="${PN/2/-II}-${PV}"
39 +
40 +inherit base user
41 +
42 +DESCRIPTION="Connection pool server for PostgreSQL"
43 +HOMEPAGE="http://www.pgpool.net/"
44 +SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
45 +LICENSE="BSD"
46 +SLOT="0"
47 +
48 +KEYWORDS="~amd64 ~x86"
49 +
50 +IUSE="memcached pam ssl static-libs"
51 +
52 +RDEPEND="
53 + dev-db/postgresql
54 + memcached? ( dev-libs/libmemcached )
55 + pam? ( sys-auth/pambase )
56 + ssl? ( dev-libs/openssl )
57 +"
58 +DEPEND="${RDEPEND}
59 + sys-devel/bison
60 + !!dev-db/pgpool
61 +"
62 +
63 +S=${WORKDIR}/${MY_P}
64 +
65 +pkg_setup() {
66 + enewgroup postgres 70
67 + enewuser pgpool -1 -1 -1 postgres
68 +
69 + # We need the postgres user as well so we can set the proper
70 + # permissions on the sockets without getting into fights with
71 + # PostgreSQL's initialization scripts.
72 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
73 +}
74 +
75 +src_prepare() {
76 + epatch "${FILESDIR}/pgpool_run_paths.patch"
77 +
78 + local pg_config_manual="$(pg_config --includedir)/pg_config_manual.h"
79 + local pgsql_socket_dir=$(grep DEFAULT_PGSOCKET_DIR "${pg_config_manual}" | \
80 + sed 's|.*\"\(.*\)\"|\1|g')
81 + local pgpool_socket_dir="$(dirname $pgsql_socket_dir)/pgpool"
82 +
83 + sed "s|@PGSQL_SOCKETDIR@|${pgsql_socket_dir}|g" \
84 + -i *.conf.sample* pool.h || die
85 +
86 + sed "s|@PGPOOL_SOCKETDIR@|${pgpool_socket_dir}|g" \
87 + -i *.conf.sample* pool.h || die
88 +}
89 +
90 +src_configure() {
91 + local myconf
92 + use memcached && \
93 + myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
94 + use pam && myconf+=' --with-pam'
95 +
96 + econf \
97 + --disable-rpath \
98 + --sysconfdir="${EROOT%/}/etc/${PN}" \
99 + $(use_with ssl openssl) \
100 + $(use_enable static-libs static) \
101 + ${myconf}
102 +}
103 +
104 +src_compile() {
105 + emake
106 +
107 + emake -C sql
108 +}
109 +
110 +src_install() {
111 + emake DESTDIR="${D}" install
112 +
113 + emake DESTDIR="${D}" -C sql install
114 + cd "${S}"
115 +
116 + # 3.3 appears to have removed this
117 + # `contrib' moved to `extension' with PostgreSQL 9.1
118 + #local pgslot=$(postgresql-config show)
119 + #if [[ ${pgslot//.} > 90 ]] ; then
120 + # cd "${ED%/}$(pg_config --sharedir)"
121 + # mv contrib extension || die
122 + # cd "${S}"
123 + #fi
124 +
125 + newinitd "${FILESDIR}/${PN}.initd" ${PN}
126 + newconfd "${FILESDIR}/${PN}.confd" ${PN}
127 +
128 + # Documentation
129 + dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg}
130 + dohtml -r doc
131 +
132 + # Examples and extras
133 + insinto "/usr/share/${PN}"
134 + doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample}
135 + mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die
136 +
137 + # One more thing: Evil la files!
138 + find "${ED}" -name '*.la' -exec rm -f {} +
139 +}