From 46bf4dca26a5ccded9f43e3220d7e91b67e3fd4c Mon Sep 17 00:00:00 2001 From: bougyman Date: Sat, 4 Apr 2015 23:02:41 -0500 Subject: [PATCH] New package: elasticsearch-1.5.0 elasticsearch: correct license --- srcpkgs/elasticsearch/INSTALL | 13 +++++++ .../elasticsearch/files/elasticsearch/log/run | 1 + srcpkgs/elasticsearch/files/elasticsearch/run | 3 ++ srcpkgs/elasticsearch/template | 37 +++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 srcpkgs/elasticsearch/INSTALL create mode 120000 srcpkgs/elasticsearch/files/elasticsearch/log/run create mode 100755 srcpkgs/elasticsearch/files/elasticsearch/run create mode 100644 srcpkgs/elasticsearch/template diff --git a/srcpkgs/elasticsearch/INSTALL b/srcpkgs/elasticsearch/INSTALL new file mode 100644 index 00000000000..38f51065865 --- /dev/null +++ b/srcpkgs/elasticsearch/INSTALL @@ -0,0 +1,13 @@ +# INSTALL +case "$ACTION" in +post) + if [ "$UPDATE" != "yes" ]; then + # actions to execute if package is being installed. + install -d -m0750 /var/log/elasticsearch + install -d -m0750 /var/lib/elasticsearch/data + chown -R elastic /etc/elasticsearch + chown -R elastic /var/lib/elasticsearch/data + chown -R elastic /var/log/elasticsearch + fi + ;; +esac diff --git a/srcpkgs/elasticsearch/files/elasticsearch/log/run b/srcpkgs/elasticsearch/files/elasticsearch/log/run new file mode 120000 index 00000000000..914853dd4fc --- /dev/null +++ b/srcpkgs/elasticsearch/files/elasticsearch/log/run @@ -0,0 +1 @@ +/usr/bin/rsvlog \ No newline at end of file diff --git a/srcpkgs/elasticsearch/files/elasticsearch/run b/srcpkgs/elasticsearch/files/elasticsearch/run new file mode 100755 index 00000000000..6b04b177081 --- /dev/null +++ b/srcpkgs/elasticsearch/files/elasticsearch/run @@ -0,0 +1,3 @@ +#!/bin/sh +. /etc/profile # to pull in java path +exec chpst -u elastic elasticsearch 2>&1 diff --git a/srcpkgs/elasticsearch/template b/srcpkgs/elasticsearch/template new file mode 100644 index 00000000000..dd998985f18 --- /dev/null +++ b/srcpkgs/elasticsearch/template @@ -0,0 +1,37 @@ +# Template file for 'elasticsearch' +pkgname=elasticsearch +version=1.5.0 +revision=1 +only_for_archs="i686 x86_64" +depends="sv-helper virtual?java-runtime" +short_desc="A distributed, open source search and analytics engine" +maintainer="bougyman " +license="apache2" +homepage="http://www.elastic.co" +distfiles="https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.0.tar.gz" +checksum=acf572c606552bc446cceef3f8e93814a363ba0d215b323a2864682b3abfbe45 +system_accounts="elastic" +system_groups="elastic" +conf_files="/etc/elasticsearch/elasticserch.yml /etc/elasticsearch/logging.yml" + +do_install() { + install -d -m0755 "${DESTDIR}"/usr/lib/elasticsearch/bin + install -d -m0755 "${DESTDIR}"/usr/lib/elasticsearch/lib/sigar + install -d -m0755 "${DESTDIR}"/usr/bin + install -d -m0750 "${DESTDIR}"/etc/elasticsearch + vcopy bin/elasticsearch usr/lib/elasticsearch/bin + vcopy bin/elasticsearch.in.sh usr/lib/elasticsearch/bin + vcopy lib/*.jar usr/lib/elasticsearch/lib + vcopy lib/sigar/*.jar usr/lib/elasticsearch/lib/sigar + vcopy lib/sigar/libsigar-x86-linux.so usr/lib/elasticsearch/lib/sigar + vcopy lib/sigar/libsigar-amd64-linux.so usr/lib/elasticsearch/lib/sigar + vcopy config/*.yml etc/elasticsearch + ln -s /usr/lib/elasticsearch/bin/elasticsearch "${DESTDIR}"/usr/bin/elasticsearch + ln -s /etc/elasticsearch "${DESTDIR}"/usr/lib/elasticsearch/config + ln -s /var/lib/elasticsearch/data "${DESTDIR}"/usr/lib/elasticsearch/data + ln -s /var/log/elasticsearch "${DESTDIR}"/usr/lib/elasticsearch/logs + vlicense LICENSE.txt + vlicense NOTICE.txt + vdoc README.textile + vsv elasticsearch +}