aboutsummaryrefslogtreecommitdiffstats
path: root/main/slony1
diff options
context:
space:
mode:
authorJeff Bilyk <jbilyk@alpinelinux.org>2014-04-14 15:20:42 +0000
committerJeff Bilyk <jbilyk@alpinelinux.org>2014-04-14 15:20:42 +0000
commit9190e1db891841cd138597ff4b9c157720ebba7d (patch)
tree12a2e9aaf079a6028b116d7a6d0a468683ec2f6f /main/slony1
parentaeae89ebfb6d01961dfad95de155e0b82a6ad75e (diff)
downloadaports-9190e1db891841cd138597ff4b9c157720ebba7d.tar.bz2
aports-9190e1db891841cd138597ff4b9c157720ebba7d.tar.xz
main/slony1: moved from testing
Diffstat (limited to 'main/slony1')
-rw-r--r--main/slony1/APKBUILD58
-rw-r--r--main/slony1/slony1.confd12
-rwxr-xr-xmain/slony1/slony1.initd37
3 files changed, 107 insertions, 0 deletions
diff --git a/main/slony1/APKBUILD b/main/slony1/APKBUILD
new file mode 100644
index 0000000000..e6fdc6e8e8
--- /dev/null
+++ b/main/slony1/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=slony1
+pkgver=2.2.2
+pkgrel=0
+pkgdesc="A master to multiple slaves replication system for PostgreSQL"
+url="http://slony.info/"
+arch="all"
+license="BSD"
+depends=""
+makedepends="postgresql-dev"
+install=""
+subpackages=""
+source="http://main.slony.info/downloads/${pkgver%.*}/source/slony1-$pkgver.tar.bz2
+ slony1.initd
+ slony1.confd"
+
+_builddir="$srcdir"/slony1-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+ install -Dm755 "$srcdir"/slony1.initd "$pkgdir"/etc/init.d/slony1 \
+ || return 1
+ install -Dm644 "$srcdir"/slony1.confd "$pkgdir"/etc/conf.d/slony1 \
+ || return 1
+}
+
+md5sums="1f5bb881f068c3e249c4a536725ad8f5 slony1-2.2.2.tar.bz2
+a4d6b16ff6f23fbb578af35472f1ec97 slony1.initd
+27fe1a24fcab45c0e3ad4dd3e53287cf slony1.confd"
+sha256sums="ef5f0fa6d95fd3a6a6b2fb5bdb4610ba437b85d2ad9210caabcfb1a9a98405d2 slony1-2.2.2.tar.bz2
+e25c1e302d6e578c56ae88a7c24cdb1042f7dc986f00565b5e7d933d8224e08a slony1.initd
+f722568539e1dbb3a86aa65a2c44582780841823dbc6957ff9861a48ec38a0e3 slony1.confd"
+sha512sums="320d871fc0fa58bd8c7bc4af50f160ff8d8ea008fed3cb69aa15de14adc6bcfbee2d9659fbf196140af8764d192a5914f2a0b1e486c43533b101b91a73dca36c slony1-2.2.2.tar.bz2
+5c83eff781c2c3bfcadf26f657fc6420b6934a4531a10b2fc08a490a96b663aebac4f3cfc533e05ad87b300cb8a0f5ad577b4326bac538082dd549b10b7a80f6 slony1.initd
+769c47812dbc27b2d688e262b9287cbf975fbb5bbcbed8ccf65781edc1437e13e4be5c923f3b77b47fc81589bb429018489bec5235d03361e1032b356ad638ae slony1.confd"
diff --git a/main/slony1/slony1.confd b/main/slony1/slony1.confd
new file mode 100644
index 0000000000..07822329ab
--- /dev/null
+++ b/main/slony1/slony1.confd
@@ -0,0 +1,12 @@
+# /etc/conf.d/slony1:
+# $Header: /var/cvsroot/gentoo-x86/dev-db/slony1/files/slony1.conf,v 1.2 2007/03/07 23:18:21 nakano 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/main/slony1/slony1.initd b/main/slony1/slony1.initd
new file mode 100755
index 0000000000..4f1469dc64
--- /dev/null
+++ b/main/slony1/slony1.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/slony1/files/slony1.init,v 1.2 2007/03/07 23:18:21 nakano 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 $?
+}
+