summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2017-07-09 22:17:12 -0400
committerAaron W. Swenson <titanofold@gentoo.org>2017-07-09 22:17:12 -0400
commit5e6704a19a5161f30ec02498b62a0af91de62c67 (patch)
tree4fb8e3a5b01e3312850ad4e8640c6d8c384e11b0
parent9d03d59175075c4acac3be7e5ba5a7ded1abf17a (diff)
downloadgentoo-5e6704a19a5161f30ec02498b62a0af91de62c67.tar.gz
gentoo-5e6704a19a5161f30ec02498b62a0af91de62c67.tar.xz
dev-db/slony1: Use postgres-multi
Now build and install against multiple versions. Use flag controlled dependency on the PostgreSQL slots eliminates too many slots being emerged. Bug: 399097, 623230 Package-Manager: Portage-2.3.6, Repoman-2.3.1
-rw-r--r--dev-db/slony1/slony1-2.2.5-r1.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-db/slony1/slony1-2.2.5-r1.ebuild b/dev-db/slony1/slony1-2.2.5-r1.ebuild
new file mode 100644
index 00000000000..a312de46f7a
--- /dev/null
+++ b/dev-db/slony1/slony1-2.2.5-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+POSTGRES_COMPAT=( 9.{2..6} )
+POSTGRES_USEDEP="server,threads"
+
+inherit eutils postgres-multi versionator
+
+IUSE="doc perl"
+
+DESCRIPTION="A replication system for the PostgreSQL Database Management System"
+HOMEPAGE="http://slony.info/"
+
+# ${P}-docs.tar.bz2 contains man pages as well as additional documentation
+MAJ_PV=$(get_version_component_range 1-2)
+SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2
+ http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="${POSTGRES_DEP}
+ perl? ( dev-perl/DBD-Pg )
+"
+
+RDEPEND=${DEPEND}
+
+REQUIRE_USE="${POSTGRES_REQ_USE}"
+
+src_configure() {
+ local slot_bin_dir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/bin"
+ use perl && myconf=" --with-perltools=\"${slot_bin_dir}\""
+ postgres-multi_foreach econf ${myconf} \
+ --with-pgconfigdir="${slot_bin_dir}" \
+ --with-slonybindir="${slot_bin_dir}"
+}
+
+src_install() {
+ postgres-multi_foreach emake DESTDIR="${D}" install
+
+ dodoc INSTALL README SAMPLE TODO UPGRADING share/slon.conf-sample
+
+ if use doc ; then
+ cd "${S}"/doc
+ dohtml -r *
+ fi
+
+ newinitd "${FILESDIR}"/slony1.init slony1
+ newconfd "${FILESDIR}"/slony1.conf slony1
+}
+
+pkg_postinst() {
+ # Slony-I installs its executables into a directory that is
+ # processed by the PostgreSQL eselect module. Call it here so that
+ # the symlinks will be created.
+ ebegin "Refreshing PostgreSQL $(postgresql-config show) symlinks"
+ postgresql-config update
+ eend $?
+}