aboutsummaryrefslogtreecommitdiffstats
path: root/testing/corosync
diff options
context:
space:
mode:
Diffstat (limited to 'testing/corosync')
-rw-r--r--testing/corosync/APKBUILD64
-rw-r--r--testing/corosync/corosync.initd23
2 files changed, 87 insertions, 0 deletions
diff --git a/testing/corosync/APKBUILD b/testing/corosync/APKBUILD
new file mode 100644
index 0000000000..6b3ed82742
--- /dev/null
+++ b/testing/corosync/APKBUILD
@@ -0,0 +1,64 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=corosync
+pkgver=1.4.2
+pkgrel=0
+pkgdesc="The Corosync Cluster Engine and Application Programming Interfaces"
+url="http://www.corosync.org/"
+arch="all"
+license="BSD2"
+depends=""
+depends_dev="nss-dev net-snmp-dev"
+makedepends="$depends_dev automake autoconf"
+install=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+source="ftp://ftp:downloads@corosync.org/downloads/corosync-$pkgver/corosync-$pkgver.tar.gz
+ $pkgname.initd"
+
+_builddir="$srcdir"/corosync-$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"
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --enable-snmp \
+ --enable-nss \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+}
+
+libs() {
+ pkgdesc="The Corosync Cluster Engine Libraries"
+ mkdir -p "$subpkgdir"/usr/lib
+ cd "$pkgdir"/usr/lib
+ mv libcfg.so.* libcpg.so.* libconfdb.so.* libevs.so.* \
+ libtotem_pg.so.* liblogsys.so.* libcoroipcc.so.* \
+ libcoroipcs.so.* libquorum.so.* libvotequorum.so.* \
+ libpload.so.* libsam.so.* \
+ "$subpkgdir"/usr/lib/ || return 1
+}
+
+md5sums="061ee5522097fee69475b38a66bf1d6a corosync-1.4.2.tar.gz
+4d18555dfdd036b7a48eb5bdfd0ff053 corosync.initd"
diff --git a/testing/corosync/corosync.initd b/testing/corosync/corosync.initd
new file mode 100644
index 0000000000..6c134bd937
--- /dev/null
+++ b/testing/corosync/corosync.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/corosync/files/corosync.initd,v 1.2 2010/11/17 07:07:03 xarthisius Exp $
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ ebegin "Starting Corosync Cluster Engine"
+ start-stop-daemon --start -q --exec /usr/sbin/corosync \
+ --pidfile /var/run/corosync.pid --make-pidfile --background \
+ -- -f
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Corosync Cluster Engine"
+ start-stop-daemon --stop -q --pidfile /var/run/corosync.pid
+ eend $?
+}