summaryrefslogtreecommitdiff
path: root/databases/elasticsearch/Makefile
diff options
context:
space:
mode:
authorimil <imil@pkgsrc.org>2014-04-16 17:22:14 +0000
committerimil <imil@pkgsrc.org>2014-04-16 17:22:14 +0000
commit7552d861d8a7fa936deb0fbf066946582e2f0438 (patch)
tree534ec28714ecfb077bb106582726964fef9645ed /databases/elasticsearch/Makefile
parent37ff7af48015ea34cb2fdd885fa5437b1cf700f2 (diff)
downloadpkgsrc-7552d861d8a7fa936deb0fbf066946582e2f0438.tar.gz
Initial import of elasticsearch, version 1.1.0, into the NetBSD Packages
Collection. Elasticsearch is a distributed RESTful search engine built for the cloud. Features include: * Distributed and Highly Available Search Engine. * Multi Tenant with Multi Types. * Various set of APIs * Document oriented * Reliable, Asynchronous Write Behind for long term persistency. * (Near) Real Time Search. * Built on top of Lucene * Per operation consistency * Open Source under Apache 2 License.
Diffstat (limited to 'databases/elasticsearch/Makefile')
-rw-r--r--databases/elasticsearch/Makefile79
1 files changed, 79 insertions, 0 deletions
diff --git a/databases/elasticsearch/Makefile b/databases/elasticsearch/Makefile
new file mode 100644
index 00000000000..9e544eddbba
--- /dev/null
+++ b/databases/elasticsearch/Makefile
@@ -0,0 +1,79 @@
+# $NetBSD: Makefile,v 1.1 2014/04/16 17:22:14 imil Exp $
+
+DISTNAME= elasticsearch-1.1.0
+CATEGORIES= textproc
+MASTER_SITES= https://download.elasticsearch.org/elasticsearch/elasticsearch/
+
+MAINTAINER= imil@NetBSD.org
+HOMEPAGE= http://www.elasticsearch.org/
+COMMENT= Distributed RESTful Search Engine
+LICENSE= apache-2.0
+
+USE_LANGUAGES= # none
+USE_JAVA= run
+USE_JAVA2= yes
+NO_BUILD= yes
+
+PKG_SYSCONFSUBDIR= elasticsearch
+EXDIR= ${PREFIX}/share/examples/elasticsearch
+EGDIR= ${PREFIX}/share/elasticsearch
+
+CONFS= elasticsearch.yml logging.yml
+.for f in ${CONFS}
+CONF_FILES+= ${EXDIR}/${f} ${PKG_SYSCONFDIR}/${f}
+.endfor
+DOCS= LICENSE.txt NOTICE.txt README.textile
+BINS= elasticsearch elasticsearch.in.sh plugin
+
+.include "../../mk/bsd.prefs.mk"
+
+ES_USER?= elasticsearch
+ES_GROUP?= ${ES_USER}
+ES_LIBDIR?= ${PREFIX}/lib/elasticsearch
+ES_DBDIR?= ${VARBASE}/db/elasticsearch
+ES_LOGDIR?= ${VARBASE}/log/elasticsearch
+ES_PIDDIR?= ${VARBASE}/run
+ES_TMPDIR?= ${VARBASE}/tmp/elasticsearch
+
+PKG_USERS_VARS+= ES_USER
+PKG_GROUPS_VARS+= ES_GROUP
+PKG_GROUPS= ${ES_GROUP}
+PKG_USERS= ${ES_USER}:${ES_GROUP}
+
+FILES_SUBST+= JAVA_HOME=${PKG_JAVA_HOME} ES_USER=${ES_USER} \
+ ES_GROUP=${ES_GROUP} ES_LIBDIR=${ES_LIBDIR} \
+ ES_LOGDIR=${ES_LOGDIR} ES_PIDDIR=${ES_PIDDIR} \
+ ES_DBDIR=${ES_DBDIR} DISTNAME=${DISTNAME}
+
+
+RCD_SCRIPTS= elasticsearch
+
+OWN_DIRS_PERMS+= ${ES_LOGDIR} ${ES_USER} ${ES_GROUP} 0700
+OWN_DIRS_PERMS+= ${ES_DBDIR} ${ES_USER} ${ES_GROUP} 0700
+INSTALLATION_DIRS+= ${EXDIR} ${ES_LIBDIR} ${PREFIX}/share/doc/elasticsearch
+INSTALLATION_DIRS+= ${ES_LIBDIR}/plugins ${EGDIR}
+
+SUBST_CLASSES+= paths
+SUBST_STAGE.paths= post-patch
+SUBST_FILES.paths= config/elasticsearch.yml
+SUBST_SED.paths= -e 's,%%PKG_SYSCONFDIR%%,${PKG_SYSCONFDIR},g'
+SUBST_SED.paths+= -e 's,%%VARBASE%%,${VARBASE},g'
+SUBST_SED.paths+= -e 's,%%PREFIX%%,${PREFIX},g'
+SUBST_SED.paths+= -e 's,%%ES_TMPDIR%%,${ES_TMPDIR},g'
+
+do-install:
+.for f in ${CONFS}
+ ${INSTALL_DATA} ${WRKSRC}/config/${f} ${DESTDIR}${EXDIR}
+.endfor
+.for f in ${DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} \
+ ${DESTDIR}${PREFIX}/share/doc/elasticsearch
+.endfor
+.for f in ${BINS}
+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} \
+ ${DESTDIR}${PREFIX}/share/elasticsearch
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/lib/*.jar ${DESTDIR}${ES_LIBDIR}
+
+.include "../../mk/java-vm.mk"
+.include "../../mk/bsd.pkg.mk"