summaryrefslogtreecommitdiff
path: root/system/openais
diff options
context:
space:
mode:
authorZordrak <slackbuilds@tpa.me.uk>2010-04-18 01:05:22 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-15 10:38:20 +0200
commit146828eb2ebe72dda2a0553cd98d66b9fb4daa18 (patch)
tree73215a4abddb5908e803a4d807f800349b585cc9 /system/openais
parent8e699975b529cbd9757bf9f2eaae58046cd988a1 (diff)
downloadslackbuilds-146828eb2ebe72dda2a0553cd98d66b9fb4daa18.tar.gz
system/openais: Added (OpenAIS Standards Based Cluster Framework)
Diffstat (limited to 'system/openais')
-rw-r--r--system/openais/README20
-rw-r--r--system/openais/doinst.sh17
-rw-r--r--system/openais/openais.SlackBuild86
-rw-r--r--system/openais/openais.info10
-rw-r--r--system/openais/rc.openais.new145
-rw-r--r--system/openais/slack-desc19
6 files changed, 297 insertions, 0 deletions
diff --git a/system/openais/README b/system/openais/README
new file mode 100644
index 0000000000..9066f403ba
--- /dev/null
+++ b/system/openais/README
@@ -0,0 +1,20 @@
+openais (OSI Certified impl of Application Interface Specification)
+
+The OpenAIS Standards Based Cluster Framework is an OSI Certified
+implementation of the Service Availability Forum Application
+Interface Specification (AIS). The Application Interface
+Specification is a software API and policies which are used to
+develop applications that maintain service during faults. Restarting
+and failover of applications is also provided for those deploying
+applications which may not be modified.
+
+The OpenAIS software is built to operate on the Corosync Cluster
+Engine (http://www.corosync.org) which allows any third party to
+implement plugin cluster services using the infrastructure provided.
+
+In order to have a functioning High Availability software stack,
+before running this SlackBuild, build AND install, each in order,
+the following other SlackBuilds.
+
+Requires: libnet, libesmtp, clusterglue, clusterresourceagents,
+and corosync all available at SlackBuilds.org.
diff --git a/system/openais/doinst.sh b/system/openais/doinst.sh
new file mode 100644
index 0000000000..3b1ccf1bc4
--- /dev/null
+++ b/system/openais/doinst.sh
@@ -0,0 +1,17 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+if [ -e etc/rc.d/rc.openais ]; then
+ cp -a etc/rc.d/rc.openais etc/rc.d/rc.openais.new.incoming
+ cat etc/rc.d/rc.openais.new > etc/rc.d/rc.openais.new.incoming
+ mv etc/rc.d/rc.openais.new.incoming etc/rc.d/rc.openais.new
+fi
+
+config etc/rc.d/rc.openais.new
diff --git a/system/openais/openais.SlackBuild b/system/openais/openais.SlackBuild
new file mode 100644
index 0000000000..4d541b46e5
--- /dev/null
+++ b/system/openais/openais.SlackBuild
@@ -0,0 +1,86 @@
+#!/bin/sh
+# Generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST
+# Copyright 2009 Eric Hameleers <alien@slackware.com>, Eindhoven, Netherlands
+
+# Slackware build script for openais
+
+# Written by Zordrak <sbo@tpa.me.uk>
+
+# Based on http://slackbuilds.org/template.SlackBuild
+# Modified by the SlackBuilds.org project
+
+PRGNAM=openais
+VERSION=${VERSION:-1.1.2}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux \
+ --with-lcrso-dir=/usr/libexec/lcrso
+
+make
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS CHANGELOG LICENSE README.amf \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Install .rc script.
+install -D -m0755 -oroot -groot $CWD/rc.$PRGNAM.new $PKG/etc/rc.d/rc.$PRGNAM.new
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/openais/openais.info b/system/openais/openais.info
new file mode 100644
index 0000000000..0a688554b0
--- /dev/null
+++ b/system/openais/openais.info
@@ -0,0 +1,10 @@
+PRGNAM="openais"
+VERSION="1.1.2"
+HOMEPAGE="http://www.openais.org/"
+DOWNLOAD="ftp://ftp:downloads@ftp.openais.org/downloads/openais-1.1.2/openais-1.1.2.tar.gz"
+MD5SUM="f94ccb867358ac54ab24bc54def27335"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Zordrak"
+EMAIL="slackbuilds@tpa.me.uk"
+APPROVED="dsomero"
diff --git a/system/openais/rc.openais.new b/system/openais/rc.openais.new
new file mode 100644
index 0000000000..8d9498afb7
--- /dev/null
+++ b/system/openais/rc.openais.new
@@ -0,0 +1,145 @@
+#!/bin/sh
+#
+# corosync Start the OpenAIS
+#
+# Author: Andrew Beekhof <abeekhof@suse.de>
+# License: Revised BSD
+#
+# chkconfig: - 20 20
+# processname: corosync
+# description: OpenAIS
+#
+### BEGIN INIT INFO
+# Description: corosync....
+#
+# Short-Description: OpenAIS
+# Provides: corosync
+# Required-Start: $network
+# Should-Start: $syslog
+# Required-Stop: $network
+# Default-Start: 3 5
+# Default-Stop: 0 6
+### END INIT INFO
+
+do_force=0
+prog="corosync"
+lockfile="/var/lock/subsys/$prog"
+
+internal_status() {
+ killall -0 corosync > /dev/null 2>&1
+ return $?
+}
+
+status() {
+ if
+ ! internal_status
+ then
+ echo "Stopped"
+ return 7
+ fi
+
+ echo "Running"
+ return 0
+}
+
+start() {
+ echo -n $"Starting OpenAIS ($prog): "
+ if
+ ! internal_status
+ then
+ echo -n "starting... "
+ $prog 2>&1 > /dev/null 2>&1
+ echo -n "rc=$?: "
+ fi
+
+ sleep 2 # give it time to fail... $? isn't definitive
+
+ if
+ internal_status
+ then
+ echo "OK"
+ return 0
+ fi
+
+ echo "Failed"
+ return 1
+}
+
+do_force=0
+do_forever=1
+
+stop() {
+ echo -n $"Stopping OpenAIS ($prog): "
+
+ killall -QUIT corosync
+
+ if [ $do_forever = 0 ]; then
+ for i in 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20; do
+ if
+ internal_status
+ then
+ sleep 2
+ echo -n "."
+ else
+ rm -f "$lockfile"
+ echo "OK"
+ return 0
+ fi
+ done
+
+ if [ $do_force = 1 ]; then
+ echo -n "Escalating... "
+ killall -KILL corosync
+ sleep 5
+
+ if
+ ! internal_status
+ then
+ rm -f "$lockfile"
+ echo "OK"
+ return 0
+ fi
+ fi
+
+ echo "Failed"
+ return 1
+ fi
+
+ while
+ internal_status
+ do
+ sleep 1
+ echo -n "."
+ done
+
+ rm -f "$lockfile"
+ echo "OK"
+ return 0
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start|stop|restart)
+ $1
+ ;;
+ force-stop)
+ do_force=1
+ stop
+ ;;
+ reload|force-reload)
+ restart
+ ;;
+ condrestart|try-restart)
+ [ ! -f "$lockfile" ] || restart
+ ;;
+ status)
+ status $prog
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|force-stop|status}"
+ exit 2
+esac
diff --git a/system/openais/slack-desc b/system/openais/slack-desc
new file mode 100644
index 0000000000..b872e9e69a
--- /dev/null
+++ b/system/openais/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+openais: openais (OSI Certified impl of Application Interface Specification)
+openais:
+openais: The OpenAIS Standards Based Cluster Framework is an OSI Certified
+openais: implementation of the Service Availability Forum Application
+openais: Interface Specification (AIS). The Application Interface
+openais: Specification is a software API and policies which are used to
+openais: develop applications that maintain service during faults. Restarting
+openais: and failover of applications is also provided for those deploying
+openais: applications which may not be modified.
+openais:
+openais: Homepage: http://www.openais.org