# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
categories databases java
maintainers @gerardsoleca openmaintainer
description Distributed RESTful search engine built for the cloud
long_description Elasticsearch is a highly scalable open-source full-text \
search and analytics engine. It allows you to store search, \
and analyze big volumes of data quickly and in near \
real time. It is generally used as the underlying \
engine/technology that powers applications that have complex \
search features and requirements. \
Elasticsearch requires Java/OpenJDK 11+, which comes installed. \
Other Java versions are not supported.
homepage https://www.elastic.co/
master_sites https://artifacts.elastic.co/downloads/${name}/
distname ${name}-${version}-darwin-x86_64
checksums rmd160 f6c8a5214a60391c39c04db66ae0fc7b6b180375 \
sha256 ce819d92b889ac36608aff3bc7226741e1fe599328ef3221344933725286f1e3 \
# see https://www.elastic.co/support/matrix#matrix_jvm
# JDK port to install if required java not found
patchfiles patch-elasticsearch-yml.diff \
patch-elasticsearch-env.diff \
set elasticdir ${prefix}/share/${name}
set confdir ${prefix}/etc/${name}
set logdir ${prefix}/var/log/${name}
set dbdir ${prefix}/var/${name}
# Elasticsearch cannot run as root, so a dedicated user is required
add_users ${user} group=${group} realname=Elasticsearch\ Server
# Change the PREFIX in the config files. They are already patched.
reinplace s|@PREFIX@|${prefix}|g ${worksrcpath}/config/elasticsearch.yml
reinplace s|@PREFIX@|${prefix}|g ${worksrcpath}/bin/elasticsearch-env
reinplace s|@PREFIX_LOGDIR@|${logdir}|g ${worksrcpath}/config/jvm.options