2015-02-15 21:30:10 +03:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2013-09-23 15:23:34 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2015-08-11 00:17:55 +03:00
|
|
|
# $Id$
|
2013-09-23 15:23:34 +04:00
|
|
|
|
|
|
|
EAPI="4"
|
|
|
|
|
|
|
|
inherit eutils 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="|| (
|
2014-12-29 09:27:40 +03:00
|
|
|
dev-db/postgresql:9.3[server]
|
|
|
|
dev-db/postgresql:9.2[server]
|
|
|
|
dev-db/postgresql:9.1[server]
|
|
|
|
dev-db/postgresql:9.0[server]
|
2013-09-23 15:23:34 +04:00
|
|
|
)
|
2014-12-29 09:27:40 +03:00
|
|
|
dev-db/postgresql[threads]
|
2013-09-23 15:23:34 +04:00
|
|
|
perl? ( dev-perl/DBD-Pg )
|
|
|
|
"
|
|
|
|
|
|
|
|
pkg_setup() {
|
|
|
|
local PGSLOT="$(postgresql-config show)"
|
|
|
|
if [[ ${PGSLOT//.} < 83 ]] ; then
|
|
|
|
eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher."
|
|
|
|
eerror "Set an appropriate slot with postgresql-config."
|
|
|
|
die "postgresql-config not set to 8.3 or higher."
|
|
|
|
fi
|
|
|
|
|
|
|
|
# if [[ ${PGSLOT//.} > 90 ]] ; then
|
|
|
|
# ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0."
|
|
|
|
# ewarn "This is neither supported here nor upstream."
|
|
|
|
# ewarn "Any bugs you encounter should be reported upstream."
|
|
|
|
# fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
local myconf
|
|
|
|
use perl && myconf='--with-perltools'
|
|
|
|
econf ${myconf}
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
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
|
|
|
|
}
|