summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/slony1/Manifest4
-rw-r--r--dev-db/slony1/files/slony1.conf12
-rwxr-xr-xdev-db/slony1/files/slony1.init37
-rw-r--r--dev-db/slony1/slony1-1.2.15.ebuild44
4 files changed, 97 insertions, 0 deletions
diff --git a/dev-db/slony1/Manifest b/dev-db/slony1/Manifest
new file mode 100644
index 0000000..a2480f6
--- /dev/null
+++ b/dev-db/slony1/Manifest
@@ -0,0 +1,4 @@
+AUX slony1.conf 355 RMD160 e767dc86a40e3018e208042105947d4249ba3fde SHA1 cd9107707e72881d44f0ac59685d916c5e8c32cb SHA256 c97cd77404941623968718f53ea3e3ce7a29d94dadf563041941762b00f3280f
+AUX slony1.init 720 RMD160 d7bce8438338fe40687a304f524f5e3d80c76a12 SHA1 a846254c88a0ac86bd0b02768d8d0110202845b5 SHA256 3947a1fb14979937f1c59dd20e478268ab219b93d718117a1db7968a183176cb
+DIST slony1-1.2.15.tar.bz2 871479 RMD160 c99a862bda6aca8adf7f838a872fc66eac556732 SHA1 cc0f5e5d904070a2496a66fe9482c2fdbdda372c SHA256 a8330b409d834309ee9a3dbde85563f6ce4800941443b7490a34a459cbc1aca8
+EBUILD slony1-1.2.15.ebuild 1236 RMD160 1040f07102a869e22dffb797f7d26b18c341b7b3 SHA1 62c3d4e42f509163e517457edbc1ba001fad46a6 SHA256 d30f245c338a90d9e89fdfb09b70484c2c1a898146ccfa467ae3cf7be7625fa0
diff --git a/dev-db/slony1/files/slony1.conf b/dev-db/slony1/files/slony1.conf
new file mode 100644
index 0000000..acd4df1
--- /dev/null
+++ b/dev-db/slony1/files/slony1.conf
@@ -0,0 +1,12 @@
+# /etc/conf.d/slony1:
+# $Header: /var/cvs/lportage/dev-db/slony1/files/slony1.conf,v 1.1 2008-12-11 17:54:27 dan.goodliffe Exp $
+
+# Configuration file for /etc/init.d/slony1
+
+USER=postgres
+CLUSTER=your_cluster_name
+DBUSER=postgres
+DBNAME=your_database_name
+DBHOST=localhost
+LOGFILE=/var/lib/postgresql/data/slony1.log
+LOGLEVEL=1 # 1(minimum)..4(maximum)
diff --git a/dev-db/slony1/files/slony1.init b/dev-db/slony1/files/slony1.init
new file mode 100755
index 0000000..36f1ec3
--- /dev/null
+++ b/dev-db/slony1/files/slony1.init
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvs/lportage/dev-db/slony1/files/slony1.init,v 1.1 2008-12-11 17:54:27 dan.goodliffe Exp $
+
+depend() {
+ need postgresql
+}
+
+start() {
+ ebegin "Starting slony1"
+ /usr/bin/slon -p /var/run/slony1.pid -d $LOGLEVEL $CLUSTER "dbname=$DBNAME user=$DBUSER host=$DBHOST" >> $LOGFILE 2>&1 &
+
+ while :
+ do
+ cnt=$(($cnt + 1))
+ if [ -f "/var/run/slony1.pid" ]; then
+ ret=0
+ break
+ fi
+
+ if [ $cnt -eq 30 ]; then
+ eerror "Please see log file: $LOGFILE"
+ ret=1
+ break
+ fi
+ sleep 1
+ done
+ eend $ret
+}
+
+stop() {
+ ebegin "Stopping slony1"
+ kill `cat /var/run/slony1.pid`
+ eend $?
+}
+
diff --git a/dev-db/slony1/slony1-1.2.15.ebuild b/dev-db/slony1/slony1-1.2.15.ebuild
new file mode 100644
index 0000000..acb3689
--- /dev/null
+++ b/dev-db/slony1/slony1-1.2.15.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvs/lportage/dev-db/slony1/slony1-1.2.15.ebuild,v 1.1 2008-12-11 17:54:27 dan.goodliffe Exp $
+
+inherit eutils
+
+IUSE="perl"
+
+DESCRIPTION="A replication system for the PostgreSQL Database Management System"
+HOMEPAGE="http://slony.info/"
+SRC_URI="http://main.slony.info/downloads/1.2/source/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="virtual/postgresql-server
+ perl? ( dev-perl/DBD-Pg )"
+
+src_compile() {
+ local myconf=""
+
+ myconf="${myconf} --with-pgincludedir=/usr/include/postgresql/pgsql"
+ myconf="${myconf} --with-pgincludeserverdir=/usr/include/postgresql/server"
+ myconf="${myconf} $(use_with perl perltools)"
+
+ econf ${myconf} || die "econf failed!"
+ emake || die "emake failed!"
+
+ if use perl ; then
+ cd "${S}"/tools
+ emake || die "emake tools failed!"
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed!"
+
+ dodoc HISTORY-1.1 INSTALL README SAMPLE TODO UPGRADING doc/howto/*.txt
+ dohtml doc/howto/*.html
+
+ newinitd "${FILESDIR}"/slony1.init slony1 || die "newinitd failed!"
+ newconfd "${FILESDIR}"/slony1.conf slony1 || die "newconfd failed!"
+}