void-packages/srcpkgs/elasticsearch/template
2015-09-25 08:07:03 +02:00

41 lines
1.5 KiB
Bash

# Template file for 'elasticsearch'
pkgname=elasticsearch
version=1.7.2
revision=1
only_for_archs="i686 x86_64"
depends="virtual?java-runtime"
short_desc="A distributed, open source search and analytics engine"
maintainer="bougyman <bougyman@voidlinux.eu>"
license="Apache-2.0"
homepage="http://www.elastic.co"
distfiles="https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${version}.tar.gz"
checksum=6f81935e270c403681e120ec4395c28b2ddc87e659ff7784608b86beb5223dd2
system_accounts="elastic"
conf_files="/etc/elasticsearch/elasticsearch.yml /etc/elasticsearch/logging.yml"
do_install() {
vmkdir usr/bin
vmkdir usr/lib/$pkgname/bin
vmkdir usr/lib/$pkgname/lib/sigar
vmkdir etc/$pkgname
vcopy bin/elasticsearch usr/lib/elasticsearch/bin
vcopy bin/elasticsearch.in.sh usr/lib/elasticsearch/bin
vcopy bin/plugin usr/lib/elasticsearch/bin
vcopy lib/*.jar usr/lib/elasticsearch/lib
vcopy lib/sigar/*.jar usr/lib/elasticsearch/lib/sigar
if [ "$XBPS_TARGET_MACHINE" = "i686" ];then
vcopy lib/sigar/libsigar-x86-linux.so usr/lib/elasticsearch/lib/sigar
else
vcopy lib/sigar/libsigar-amd64-linux.so usr/lib/elasticsearch/lib/sigar
fi
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
}