Gentoo Archives: gentoo-commits

From: Aaron Swenson <titanofold@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/slony1/
Date: Mon, 10 Jul 2017 02:27:40
Message-Id: 1499653032.5e6704a19a5161f30ec02498b62a0af91de62c67.titanofold@gentoo
1 commit: 5e6704a19a5161f30ec02498b62a0af91de62c67
2 Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 10 02:17:12 2017 +0000
4 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 10 02:17:12 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e6704a1
7
8 dev-db/slony1: Use postgres-multi
9
10 Now build and install against multiple versions.
11
12 Use flag controlled dependency on the PostgreSQL slots eliminates too
13 many slots being emerged.
14
15 Bug: 399097, 623230
16
17 Package-Manager: Portage-2.3.6, Repoman-2.3.1
18
19 dev-db/slony1/slony1-2.2.5-r1.ebuild | 62 ++++++++++++++++++++++++++++++++++++
20 1 file changed, 62 insertions(+)
21
22 diff --git a/dev-db/slony1/slony1-2.2.5-r1.ebuild b/dev-db/slony1/slony1-2.2.5-r1.ebuild
23 new file mode 100644
24 index 00000000000..a312de46f7a
25 --- /dev/null
26 +++ b/dev-db/slony1/slony1-2.2.5-r1.ebuild
27 @@ -0,0 +1,62 @@
28 +# Copyright 1999-2017 Gentoo Foundation
29 +# Distributed under the terms of the GNU General Public License v2
30 +
31 +EAPI="6"
32 +
33 +POSTGRES_COMPAT=( 9.{2..6} )
34 +POSTGRES_USEDEP="server,threads"
35 +
36 +inherit eutils postgres-multi versionator
37 +
38 +IUSE="doc perl"
39 +
40 +DESCRIPTION="A replication system for the PostgreSQL Database Management System"
41 +HOMEPAGE="http://slony.info/"
42 +
43 +# ${P}-docs.tar.bz2 contains man pages as well as additional documentation
44 +MAJ_PV=$(get_version_component_range 1-2)
45 +SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2
46 + http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2"
47 +
48 +LICENSE="BSD GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~ppc ~x86"
51 +
52 +DEPEND="${POSTGRES_DEP}
53 + perl? ( dev-perl/DBD-Pg )
54 +"
55 +
56 +RDEPEND=${DEPEND}
57 +
58 +REQUIRE_USE="${POSTGRES_REQ_USE}"
59 +
60 +src_configure() {
61 + local slot_bin_dir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/bin"
62 + use perl && myconf=" --with-perltools=\"${slot_bin_dir}\""
63 + postgres-multi_foreach econf ${myconf} \
64 + --with-pgconfigdir="${slot_bin_dir}" \
65 + --with-slonybindir="${slot_bin_dir}"
66 +}
67 +
68 +src_install() {
69 + postgres-multi_foreach emake DESTDIR="${D}" install
70 +
71 + dodoc INSTALL README SAMPLE TODO UPGRADING share/slon.conf-sample
72 +
73 + if use doc ; then
74 + cd "${S}"/doc
75 + dohtml -r *
76 + fi
77 +
78 + newinitd "${FILESDIR}"/slony1.init slony1
79 + newconfd "${FILESDIR}"/slony1.conf slony1
80 +}
81 +
82 +pkg_postinst() {
83 + # Slony-I installs its executables into a directory that is
84 + # processed by the PostgreSQL eselect module. Call it here so that
85 + # the symlinks will be created.
86 + ebegin "Refreshing PostgreSQL $(postgresql-config show) symlinks"
87 + postgresql-config update
88 + eend $?
89 +}