diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-11-07 09:46:25 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2018-11-07 09:46:25 +0000 |
commit | acff94dfc20e83b2d21afcfcc9f84928e45c1231 (patch) | |
tree | 92c3122699d9603a999014ebd625a48083332bcb /community | |
parent | 11eff020b83662c550fc47164ee8d76f2be20f2b (diff) | |
download | aports-acff94dfc20e83b2d21afcfcc9f84928e45c1231.tar.bz2 aports-acff94dfc20e83b2d21afcfcc9f84928e45c1231.tar.xz |
main/slony1: move to community
Diffstat (limited to 'community')
-rw-r--r-- | community/slony1/APKBUILD | 49 | ||||
-rw-r--r-- | community/slony1/default-config.patch | 11 | ||||
-rw-r--r-- | community/slony1/slony1.confd | 10 | ||||
-rw-r--r-- | community/slony1/slony1.initd | 41 |
4 files changed, 111 insertions, 0 deletions
diff --git a/community/slony1/APKBUILD b/community/slony1/APKBUILD new file mode 100644 index 0000000000..3547fbfd26 --- /dev/null +++ b/community/slony1/APKBUILD @@ -0,0 +1,49 @@ +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=slony1 +pkgver=2.2.7 +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="" +options="!check" +subpackages="$pkgname-openrc" +source="http://main.slony.info/downloads/${pkgver%.*}/source/slony1-$pkgver.tar.bz2 + slony1.initd + slony1.confd + + default-config.patch + " + +builddir="$srcdir"/slony1-$pkgver + +prepare() { + default_prepare + update_config_guess +} + +build() { + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --with-pgpkglibdir=/usr/lib/postgresql + make +} + +package() { + make DESTDIR="$pkgdir" install + install -Dm644 share/slon.conf-sample "$pkgdir"/etc/slon.conf + install -Dm755 "$srcdir"/slony1.initd "$pkgdir"/etc/init.d/slony1 + install -Dm644 "$srcdir"/slony1.confd "$pkgdir"/etc/conf.d/slony1 +} + +sha512sums="22700e1574c91d4a4be5b78aac967eebc039440897364780891c2c76ed5b8e07c03205f0fbcd4870ee7c620d62b175987c46c43750524c6e5f9009044cc24f9a slony1-2.2.7.tar.bz2 +0281cb197db53cf5c3c6aca3bcc1d7010127fe2a7bbb36d48a9c044311d65e0ffaf0f6b83a0100e1ec0f442bc4614b1d6726b8589f779f36d7369594b956b794 slony1.initd +474fe25e49cd88a705911255d127417dabf9ba675aa67faad336dc419f19ea7416d48e84d26b03b63cec74524383b132439640b715c54fbd22389468342f0e4b slony1.confd +fa74f013e595faaa801375c41516c23801a4811ac5993a08da1d595550f8fa6fc092c1b7ffd769cd8c9118eb71f3029b0ef1bd24ec502f240512ee97f82ed028 default-config.patch" diff --git a/community/slony1/default-config.patch b/community/slony1/default-config.patch new file mode 100644 index 0000000000..ebc60f8c2d --- /dev/null +++ b/community/slony1/default-config.patch @@ -0,0 +1,11 @@ +--- ./share/slon.conf-sample.orig ++++ ./share/slon.conf-sample +@@ -49,7 +49,7 @@ + # still go to the standard output/error). The default is 0, which means + # syslog is off. + # Range: [0-2], default: 0 +-#syslog=0 ++syslog=2 + + # If true, include the process ID on each log line. Default is false. + #log_pid=false diff --git a/community/slony1/slony1.confd b/community/slony1/slony1.confd new file mode 100644 index 0000000000..a40df2e11a --- /dev/null +++ b/community/slony1/slony1.confd @@ -0,0 +1,10 @@ +# /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 diff --git a/community/slony1/slony1.initd b/community/slony1/slony1.initd new file mode 100644 index 0000000000..1de7a8097f --- /dev/null +++ b/community/slony1/slony1.initd @@ -0,0 +1,41 @@ +#!/sbin/openrc-run + +pidfile=/var/run/slony/slony1.pid +command=/usr/bin/slon +config=/etc/slon.conf + +depend() { + need postgresql net + after firewall +} + +start_pre() { + checkpath --directory ${pidfile%/*} + if ! [ -e "$config" ]; then + eerror "config file $config is missing" + return 1 + fi + if [ -n "$LOGFILE" ]; then + ewarn "LOGFILE in /etc/conf.d/slony1 is ignored. Only syslog is supported." + fi + if [ -n "$LOGLEVEL" ]; then + ewarn "LOGLEVEL in /etc/conf.d/slony1 is ignored." + fi +} + +start() { + ebegin "Starting slony1" + if [ -n "$CLUSTER" ]; then + set -- $CLUSTER "dbname=$DBNAME user=$DBUSER host=$DBHOST" + fi + start-stop-daemon --exec $command \ + --pidfile "$pidfile" \ + --background \ + --wait 100 \ + -- \ + -p "$pidfile" \ + -f "$config" \ + "$@" + eend $? +} + |