1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils multilib
7 DESCRIPTION="PostgreSQL Replication Manager"
8 HOMEPAGE="http://www.repmgr.org/"
9 SRC_URI="http://www.repmgr.org/download/${P}.tar.gz"
12 KEYWORDS="~amd64 ~x86"
16 DEPEND=">=dev-db/postgresql-9.3[server,static-libs]"
25 emake DESTDIR="${D}" USE_PGXS=1 install
26 export PGSLOT="$(postgresql-config show)"
27 einfo "PGSLOT: ${PGSLOT}"
28 PGBASEDIR=/usr/$(get_libdir)/postgresql-${PGSLOT}
29 PGBINDIR=${PGBASEDIR}/bin/
30 PGCONTRIB=/usr/share/postgresql-${PGSLOT}/contrib/
31 dodir $PGCONTRIB $PGBINDIR
33 doins sql/repmgr2_repmgr3.sql
34 dosym $PGBINDIR/repmgr /usr/bin/repmgr${PGSLOT//.}
35 dosym $PGBINDIR/repmgrd /usr/bin/repmgrd${PGSLOT//.}
36 dodoc CREDITS HISTORY COPYRIGHT TODO *.md *.rst
38 newins repmgr.conf.sample repmgr.conf
39 fowners postgres:postgres /etc/repmgr.conf
40 ewarn "Remember to modify /etc/repmgr.conf"