diff --git a/srcpkgs/elasticsearch/INSTALL b/srcpkgs/elasticsearch/INSTALL index 38f51065865..84b01fd64af 100644 --- a/srcpkgs/elasticsearch/INSTALL +++ b/srcpkgs/elasticsearch/INSTALL @@ -3,6 +3,7 @@ case "$ACTION" in post) if [ "$UPDATE" != "yes" ]; then # actions to execute if package is being installed. + install -d /usr/share/elasticsearch/plugins install -d -m0750 /var/log/elasticsearch install -d -m0750 /var/lib/elasticsearch/data chown -R elastic /etc/elasticsearch diff --git a/srcpkgs/elasticsearch/template b/srcpkgs/elasticsearch/template index cf524df372e..24d277cf78a 100644 --- a/srcpkgs/elasticsearch/template +++ b/srcpkgs/elasticsearch/template @@ -1,41 +1,48 @@ # Template file for 'elasticsearch' pkgname=elasticsearch -version=1.7.3 -revision=2 +version=5.1.2 +revision=1 +wrksrc="elasticsearch-${version}" only_for_archs="i686 x86_64" depends="virtual?java-runtime" short_desc="A distributed, open source search and analytics engine" -maintainer="bougyman " +maintainer="dota? =op " license="Apache-2.0" homepage="http://www.elastic.co" -distfiles="https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${version}.tar.gz" -checksum=af517611493374cfb2daa8897ae17e63e2efea4d0377d316baa351c1776a2bca +distfiles="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${version}.tar.gz" +checksum=74d752f9a8b46898d306ad169b72f328e17215c0909149e156a576089ef11c42 system_accounts="elastic" -conf_files="/etc/elasticsearch/elasticsearch.yml /etc/elasticsearch/logging.yml" +conf_files="/etc/elasticsearch/elasticsearch.yml /etc/elasticsearch/jvm.options /etc/elasticsearch/log4j2.properties" do_install() { - vmkdir usr/bin - vmkdir usr/lib/$pkgname/bin - vmkdir usr/lib/$pkgname/lib/sigar - vmkdir etc/$pkgname + ES="usr/share/elasticsearch" + + rm -f bin/*.{bat,exe} + vmkdir $ES + + vcopy bin $ES + vcopy lib $ES + vcopy modules $ES + vcopy plugins $ES + + vmkdir usr/bin + + ln -sf /$ES/bin/elasticsearch "$DESTDIR/usr/bin" + + vmkdir etc/elasticsearch + vcopy config/* etc/elasticsearch + + ln -sf /etc/elasticsearch "$DESTDIR/$ES/config" + + vmkdir var/lib/elasticsearch/data + ln -sf /var/lib/elasticsearch/data "$DESTDIR/$ES/data" + + vmkdir var/log/elasticsearch + ln -sf /var/log/elasticsearch "$DESTDIR/$ES/logs" - 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 }