repmgr-3.0.1.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib
  5. DESCRIPTION="PostgreSQL Replication Manager"
  6. HOMEPAGE="http://www.repmgr.org/"
  7. SRC_URI="http://www.repmgr.org/download/${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE=""
  12. DEPEND=">=dev-db/postgresql-9.3[server,static-libs]"
  13. RDEPEND="${DEPEND}
  14. net-misc/rsync"
  15. src_compile() {
  16. emake USE_PGXS=1
  17. }
  18. src_install() {
  19. emake DESTDIR="${D}" USE_PGXS=1 install
  20. export PGSLOT="$(postgresql-config show)"
  21. einfo "PGSLOT: ${PGSLOT}"
  22. PGBASEDIR=/usr/$(get_libdir)/postgresql-${PGSLOT}
  23. PGBINDIR=${PGBASEDIR}/bin/
  24. PGCONTRIB=/usr/share/postgresql-${PGSLOT}/contrib/
  25. dodir $PGCONTRIB $PGBINDIR
  26. insinto $PGCONTRIB
  27. doins sql/repmgr2_repmgr3.sql
  28. dosym $PGBINDIR/repmgr /usr/bin/repmgr${PGSLOT//.}
  29. dosym $PGBINDIR/repmgrd /usr/bin/repmgrd${PGSLOT//.}
  30. dodoc CREDITS HISTORY COPYRIGHT TODO *.md *.rst
  31. insinto /etc
  32. newins repmgr.conf.sample repmgr.conf
  33. fowners postgres:postgres /etc/repmgr.conf
  34. ewarn "Remember to modify /etc/repmgr.conf"
  35. }