summaryrefslogtreecommitdiff
path: root/package/openais
diff options
context:
space:
mode:
Diffstat (limited to 'package/openais')
-rw-r--r--package/openais/Makefile34
-rw-r--r--package/openais/files/openais.init29
2 files changed, 63 insertions, 0 deletions
diff --git a/package/openais/Makefile b/package/openais/Makefile
new file mode 100644
index 000000000..0d96cbc1b
--- /dev/null
+++ b/package/openais/Makefile
@@ -0,0 +1,34 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= openais
+PKG_VERSION:= 1.1.4
+PKG_RELEASE:= 1
+PKG_MD5SUM:= e500ad3c49fdc45d8653f864e80ed82c
+PKG_DESCR:= AIS implementation
+PKG_SECTION:= ha
+PKG_BUILDDEP:= corosync
+PKG_DEPENDS:= corosync
+PKG_URL:= http://www.openais.org/
+PKG_SITES:= ftp://ftp:download@ftp.openais.org/downloads/openais-1.1.4/
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,OPENAIS,openais,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_ENV+= ac_cv_func_fnmatch_works=yes
+
+openais-install:
+ $(INSTALL_DIR) $(IDIR_OPENAIS)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/lib*.so* \
+ $(IDIR_OPENAIS)/usr/lib
+ $(INSTALL_DIR) $(IDIR_OPENAIS)/usr/sbin
+ $(CP) $(WRKINST)/usr/sbin/* \
+ $(IDIR_OPENAIS)/usr/sbin
+ $(INSTALL_DIR) $(IDIR_OPENAIS)/usr/libexec
+ $(CP) $(WRKINST)/usr/libexec/* \
+ $(IDIR_OPENAIS)/usr/libexec
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/openais/files/openais.init b/package/openais/files/openais.init
new file mode 100644
index 000000000..f36121c7a
--- /dev/null
+++ b/package/openais/files/openais.init
@@ -0,0 +1,29 @@
+#!/bin/sh
+#PKG openais
+#INIT 80
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${corosync:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ mount -t tmpfs -o size=4M tmpfs /dev/shm
+ [ -d /var/lib/corosync ] || mkdir -p /var/lib/corosync
+ /usr/sbin/aisexec
+ ;;
+stop)
+ kill $(pgrep -f corosync)
+ umount /dev/shm
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ ;;
+esac
+exit $?