summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2017-07-09 22:24:33 -0400
committerAaron W. Swenson <titanofold@gentoo.org>2017-07-09 22:24:33 -0400
commitba7463bc581fa454f1803b4b828b746d25a4d639 (patch)
treea8f592f4c1c175ca64177858b9696e80de3911e3 /dev-db/pgpool2/pgpool2-9999.ebuild
parentdev-db/postgis: Use postgres-multi.eclass (diff)
downloadgentoo-ba7463bc581fa454f1803b4b828b746d25a4d639.tar.gz
gentoo-ba7463bc581fa454f1803b4b828b746d25a4d639.tar.bz2
gentoo-ba7463bc581fa454f1803b4b828b746d25a4d639.zip
dev-db/pgpool2: Bump, new repo, postgres-multi
Now installs to all selected slots via use flags. Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'dev-db/pgpool2/pgpool2-9999.ebuild')
-rw-r--r--dev-db/pgpool2/pgpool2-9999.ebuild98
1 files changed, 39 insertions, 59 deletions
diff --git a/dev-db/pgpool2/pgpool2-9999.ebuild b/dev-db/pgpool2/pgpool2-9999.ebuild
index b351db267e36..031166c54b9d 100644
--- a/dev-db/pgpool2/pgpool2-9999.ebuild
+++ b/dev-db/pgpool2/pgpool2-9999.ebuild
@@ -1,66 +1,45 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=6
-[[ ${PV} == 9999 ]] && MY_P=${PN/2/-II} || MY_P="${PN/2/-II}-${PV}"
+EGIT_REPO_URI="https://git.postgresql.org/git/pgpool2.git"
-ECVS_SERVER="cvs.pgfoundry.org:/cvsroot/pgpool"
-ECVS_MODULE="pgpool-II"
-[[ ${PV} == 9999 ]] && SCM_ECLASS="cvs"
-inherit base user ${SCM_ECLASS}
-unset SCM_ECLASS
+POSTGRES_COMPAT=( 9.{2..6} )
+
+inherit git-r3 postgres-multi
DESCRIPTION="Connection pool server for PostgreSQL"
HOMEPAGE="http://www.pgpool.net/"
-[[ ${PV} == 9999 ]] || SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+SRC_URI=""
LICENSE="BSD"
SLOT="0"
-# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
-[[ ${PV} == 9999 ]] || \
-KEYWORDS="~amd64 ~x86"
+KEYWORDS=""
-IUSE="memcached pam ssl static-libs"
+IUSE="doc memcached pam ssl static-libs"
RDEPEND="
- dev-db/postgresql
+ ${POSTGRES_DEP}
memcached? ( dev-libs/libmemcached )
pam? ( sys-auth/pambase )
- ssl? ( dev-libs/openssl )
+ ssl? ( dev-libs/openssl:* )
"
DEPEND="${RDEPEND}
sys-devel/bison
!!dev-db/pgpool
"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-S=${WORKDIR}/${MY_P}
-
pkg_setup() {
- enewgroup postgres 70
- enewuser pgpool -1 -1 -1 postgres
+ postgres_new_user pgpool
- # We need the postgres user as well so we can set the proper
- # permissions on the sockets without getting into fights with
- # PostgreSQL's initialization scripts.
- enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
+ postgres-multi_pkg_setup
}
src_prepare() {
- epatch "${FILESDIR}/pgpool_run_paths.patch"
+ eapply "${FILESDIR}/pgpool_run_paths-9999.patch"
- local pg_config_manual="$(pg_config --includedir)/pg_config_manual.h"
- local pgsql_socket_dir=$(grep DEFAULT_PGSOCKET_DIR "${pg_config_manual}" | \
- sed 's|.*\"\(.*\)\"|\1|g')
- local pgpool_socket_dir="$(dirname $pgsql_socket_dir)/pgpool"
-
- sed "s|@PGSQL_SOCKETDIR@|${pgsql_socket_dir}|g" \
- -i *.conf.sample* pool.h || die
-
- sed "s|@PGPOOL_SOCKETDIR@|${pgpool_socket_dir}|g" \
- -i *.conf.sample* pool.h || die
+ postgres-multi_src_prepare
}
src_configure() {
@@ -69,47 +48,48 @@ src_configure() {
myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
use pam && myconf+=' --with-pam'
- econf \
+ postgres-multi_foreach econf \
--disable-rpath \
--sysconfdir="${EROOT%/}/etc/${PN}" \
+ --with-pgsql-includedir='/usr/include/postgresql-@PG_SLOT@' \
+ --with-pgsql-libdir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/$(get_libdir)" \
$(use_with ssl openssl) \
$(use_enable static-libs static) \
${myconf}
}
src_compile() {
- emake
-
- cd sql
- emake
+ # Even though we're only going to do an install for the best slot
+ # available, the extension bits in src/sql need some things outside
+ # of that directory built, too.
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C src/sql
}
src_install() {
- emake DESTDIR="${D}" install
-
- cd sql
- emake DESTDIR="${D}" install
- cd "${S}"
-
- # `contrib' moved to `extension' with PostgreSQL 9.1
- local pgslot=$(postgresql-config show)
- if [[ ${pgslot//.} > 90 ]] ; then
- cd "${ED%/}$(pg_config --sharedir)"
- mv contrib extension || die
- cd "${S}"
- fi
+ # We only need the best stuff installed
+ postgres-multi_forbest emake DESTDIR="${D}" install
+
+ # Except for the extension and .so files that each PostgreSQL slot needs
+ postgres-multi_foreach emake DESTDIR="${D}" -C src/sql install
newinitd "${FILESDIR}/${PN}.initd" ${PN}
newconfd "${FILESDIR}/${PN}.confd" ${PN}
- # Documentation
- dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg}
- dohtml -r doc
+ # Documentation!
+ dodoc NEWS TODO
+ if use doc ; then
+ postgres-multi_forbest emake DESTDIR="${D}" -C doc install
+ fi
# Examples and extras
- insinto "/usr/share/${PN}"
- doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample}
+ # mv some files that get installed to /usr/share/pgpool-II so that
+ # they all wind up in the same place
mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die
+ into "/usr/share/${PN}"
+ dobin src/sample/{pgpool_recovery,pgpool_recovery_pitr,pgpool_remote_start}
+ insinto "/usr/share/${PN}"
+ doins src/sample/{{pcp,pgpool,pool_hba}.conf.sample*,pgpool.pam}
# One more thing: Evil la files!
find "${ED}" -name '*.la' -exec rm -f {} +