From afdb6f4a7dfab6af66ed954c5d977fcba6076e0a Mon Sep 17 00:00:00 2001 From: TJ Vanderpoel Date: Fri, 6 Mar 2015 19:47:14 -0600 Subject: [PATCH] New package: orientdb-2.0.4 --- srcpkgs/orientdb/INSTALL | 17 ++++++++ srcpkgs/orientdb/INSTALL.msg | 8 ++++ srcpkgs/orientdb/files/orientdb/conf | 3 ++ srcpkgs/orientdb/files/orientdb/log/conf | 1 + srcpkgs/orientdb/files/orientdb/log/run | 1 + srcpkgs/orientdb/files/orientdb/run | 7 ++++ srcpkgs/orientdb/patches/00_bash_not_sh.patch | 9 +++++ srcpkgs/orientdb/template | 39 +++++++++++++++++++ 8 files changed, 85 insertions(+) create mode 100644 srcpkgs/orientdb/INSTALL create mode 100644 srcpkgs/orientdb/INSTALL.msg create mode 100644 srcpkgs/orientdb/files/orientdb/conf create mode 100644 srcpkgs/orientdb/files/orientdb/log/conf create mode 120000 srcpkgs/orientdb/files/orientdb/log/run create mode 100755 srcpkgs/orientdb/files/orientdb/run create mode 100644 srcpkgs/orientdb/patches/00_bash_not_sh.patch create mode 100644 srcpkgs/orientdb/template diff --git a/srcpkgs/orientdb/INSTALL b/srcpkgs/orientdb/INSTALL new file mode 100644 index 0000000000..4b8bd54f1c --- /dev/null +++ b/srcpkgs/orientdb/INSTALL @@ -0,0 +1,17 @@ +# INSTALL +case "$ACTION" in +pre) + # Actions to execute before the package files are unpacked. + echo + ;; +post) + if [ "$UPDATE" = "yes" ]; then + # actions to execute if package is being updated. + echo + else + # actions to execute if package is being installed. + mkdir -p /var/log/orientdb + chown -R orientdb /var/lib/orientdb /etc/orientdb /var/log/orientdb /usr/lib/orientdb/bin + fi + ;; +esac diff --git a/srcpkgs/orientdb/INSTALL.msg b/srcpkgs/orientdb/INSTALL.msg new file mode 100644 index 0000000000..011973d7d8 --- /dev/null +++ b/srcpkgs/orientdb/INSTALL.msg @@ -0,0 +1,8 @@ +You must run the orientdb service once to initialize this node. + +# cd /etc/sv/orientdb +# sudo ./run + +Then you may enable the orientdb service + +# sv-enable orientdb diff --git a/srcpkgs/orientdb/files/orientdb/conf b/srcpkgs/orientdb/files/orientdb/conf new file mode 100644 index 0000000000..1ef0f3bc14 --- /dev/null +++ b/srcpkgs/orientdb/files/orientdb/conf @@ -0,0 +1,3 @@ +# Set to 'dserver' for distrubuted server +DAEMON=server +OPTS="" diff --git a/srcpkgs/orientdb/files/orientdb/log/conf b/srcpkgs/orientdb/files/orientdb/log/conf new file mode 100644 index 0000000000..1b5cf5cd9c --- /dev/null +++ b/srcpkgs/orientdb/files/orientdb/log/conf @@ -0,0 +1 @@ +USERGROUP=orientdb:orientdb diff --git a/srcpkgs/orientdb/files/orientdb/log/run b/srcpkgs/orientdb/files/orientdb/log/run new file mode 120000 index 0000000000..914853dd4f --- /dev/null +++ b/srcpkgs/orientdb/files/orientdb/log/run @@ -0,0 +1 @@ +/usr/bin/rsvlog \ No newline at end of file diff --git a/srcpkgs/orientdb/files/orientdb/run b/srcpkgs/orientdb/files/orientdb/run new file mode 100755 index 0000000000..f938bde82b --- /dev/null +++ b/srcpkgs/orientdb/files/orientdb/run @@ -0,0 +1,7 @@ +#!/bin/sh +exec 2>&1 +# We have to source the profile to get java in our path +. /etc/profile +[ -f ./conf ] && . ./conf +DAEMON=${DAEMON:-server} # Set to dserver in conf for distributed server +exec chpst -u orientdb:orientdb /usr/lib/orientdb/bin/${DAEMON}.sh $OPTS diff --git a/srcpkgs/orientdb/patches/00_bash_not_sh.patch b/srcpkgs/orientdb/patches/00_bash_not_sh.patch new file mode 100644 index 0000000000..4c6aff5bc4 --- /dev/null +++ b/srcpkgs/orientdb/patches/00_bash_not_sh.patch @@ -0,0 +1,9 @@ +diff -rupN orientdb-community-2.0.4.orig/bin/dserver.sh orientdb-community-2.0.4/bin/dserver.sh +--- orientdb-community-2.0.4.orig/bin/dserver.sh 2015-03-03 17:24:25.000000000 -0600 ++++ orientdb-community-2.0.4/bin/dserver.sh 2015-03-06 19:21:41.272493588 -0600 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # + # Copyright (c) Orient Technologies LTD (http://www.orientechnologies.com) + # diff --git a/srcpkgs/orientdb/template b/srcpkgs/orientdb/template new file mode 100644 index 0000000000..25917ce268 --- /dev/null +++ b/srcpkgs/orientdb/template @@ -0,0 +1,39 @@ +# Template file for 'orientdb' +pkgname=orientdb +version=2.0.4 +revision=1 +only_for_archs="i686 x86_64" +conf_files="/etc/orientdb/hazelcast.xml" +wrksrc="${pkgname}-community-${version}" +depends="virtual?java-runtime sv-helper" +short_desc="Distributed Graph Database" +maintainer="bougyman " +license="apache2" +patch_args="-p1" +homepage="http://orienttechnologies.com" +distfiles="http://www.orientechnologies.com/download.php?email=unknown@unknown.com&file=orientdb-community-${version}.tar.gz&os=linux>orientdb-community-${version}.tar.gz" +checksum=b7f6b29a057ea06855f94db138644244ca3ace58fb9b6b41b8036d7bbdd8f809 +system_accounts="orientdb" +conf_files="etc/orientdb/default-distributed-db-config.json + etc/orientdb/hazelcast.xml + etc/orientdb/orientdb-client-log.properties + etc/orientdb/orientdb-server-config.xml + etc/orientdb/orientdb-server-log.properties" + +do_install() { + vmkdir 'usr/lib/orientdb' + vmkdir 'etc/orientdb' + vmkdir 'var/lib/orientdb' + vmkdir 'usr/bin' + vcopy config/* etc/orientdb/ + vcopy databases/* var/lib/orientdb/ + rm -rf databases + rm -rf config + rm -rf log + ln -s /usr/lib/orientdb/bin/console.sh "${DESTDIR}/usr/bin/orientdb-console" + ln -s /var/log/orientdb "${DESTDIR}/usr/lib/orientdb/log" + ln -s /etc/orientdb "${DESTDIR}/usr/lib/orientdb/config" + ln -s /var/lib/orientdb "${DESTDIR}/usr/lib/orientdb/databases" + vcopy * usr/lib/orientdb + vsv orientdb +}