aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-11-03 15:36:09 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-11-03 15:36:09 +0000
commitf1724a024b640f0dad848d17db133ef635a1c6f0 (patch)
tree37a7b08ac7dd87e362f3157ce974f58d7bc5036e
parent5dec50abbdfe2c9bc7e96c0601ee5896227da11f (diff)
downloadaports-f1724a024b640f0dad848d17db133ef635a1c6f0.tar.bz2
aports-f1724a024b640f0dad848d17db133ef635a1c6f0.tar.xz
testing/corosync: new aport
-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 $?
+}