diff options
author | imil <imil@pkgsrc.org> | 2014-04-16 17:22:14 +0000 |
---|---|---|
committer | imil <imil@pkgsrc.org> | 2014-04-16 17:22:14 +0000 |
commit | 7552d861d8a7fa936deb0fbf066946582e2f0438 (patch) | |
tree | 534ec28714ecfb077bb106582726964fef9645ed /databases/elasticsearch | |
parent | 37ff7af48015ea34cb2fdd885fa5437b1cf700f2 (diff) | |
download | pkgsrc-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')
-rw-r--r-- | databases/elasticsearch/DESCR | 12 | ||||
-rw-r--r-- | databases/elasticsearch/Makefile | 79 | ||||
-rw-r--r-- | databases/elasticsearch/PLIST | 28 | ||||
-rw-r--r-- | databases/elasticsearch/distinfo | 6 | ||||
-rw-r--r-- | databases/elasticsearch/files/elasticsearch.sh | 53 | ||||
-rw-r--r-- | databases/elasticsearch/patches/patch-config_elasticsearch.yml | 37 |
6 files changed, 215 insertions, 0 deletions
diff --git a/databases/elasticsearch/DESCR b/databases/elasticsearch/DESCR new file mode 100644 index 00000000000..41c43026c0d --- /dev/null +++ b/databases/elasticsearch/DESCR @@ -0,0 +1,12 @@ +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. 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" diff --git a/databases/elasticsearch/PLIST b/databases/elasticsearch/PLIST new file mode 100644 index 00000000000..425b6d074f9 --- /dev/null +++ b/databases/elasticsearch/PLIST @@ -0,0 +1,28 @@ +@comment $NetBSD: PLIST,v 1.1 2014/04/16 17:22:14 imil Exp $ +lib/elasticsearch/${PKGNAME}.jar +lib/elasticsearch/jna-3.3.0.jar +lib/elasticsearch/jts-1.13.jar +lib/elasticsearch/log4j-1.2.17.jar +lib/elasticsearch/lucene-analyzers-common-4.7.0.jar +lib/elasticsearch/lucene-codecs-4.7.0.jar +lib/elasticsearch/lucene-core-4.7.0.jar +lib/elasticsearch/lucene-grouping-4.7.0.jar +lib/elasticsearch/lucene-highlighter-4.7.0.jar +lib/elasticsearch/lucene-join-4.7.0.jar +lib/elasticsearch/lucene-memory-4.7.0.jar +lib/elasticsearch/lucene-misc-4.7.0.jar +lib/elasticsearch/lucene-queries-4.7.0.jar +lib/elasticsearch/lucene-queryparser-4.7.0.jar +lib/elasticsearch/lucene-sandbox-4.7.0.jar +lib/elasticsearch/lucene-spatial-4.7.0.jar +lib/elasticsearch/lucene-suggest-4.7.0.jar +lib/elasticsearch/spatial4j-0.4.1.jar +share/doc/elasticsearch/LICENSE.txt +share/doc/elasticsearch/NOTICE.txt +share/doc/elasticsearch/README.textile +share/elasticsearch/elasticsearch +share/elasticsearch/elasticsearch.in.sh +share/elasticsearch/plugin +share/examples/elasticsearch/elasticsearch.yml +share/examples/elasticsearch/logging.yml +@pkgdir lib/elasticsearch/plugins diff --git a/databases/elasticsearch/distinfo b/databases/elasticsearch/distinfo new file mode 100644 index 00000000000..acfdca0c164 --- /dev/null +++ b/databases/elasticsearch/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2014/04/16 17:22:14 imil Exp $ + +SHA1 (elasticsearch-1.1.0.tar.gz) = 6518b6f90df21e034b20e9a222b780651a6cdcdb +RMD160 (elasticsearch-1.1.0.tar.gz) = cf5c7b69d94849859a71c2b99530b15e0949c166 +Size (elasticsearch-1.1.0.tar.gz) = 19867444 bytes +SHA1 (patch-config_elasticsearch.yml) = 25b32a911ce28bd3ec660edb1183f719eb9fd21a diff --git a/databases/elasticsearch/files/elasticsearch.sh b/databases/elasticsearch/files/elasticsearch.sh new file mode 100644 index 00000000000..8c48d7d1aae --- /dev/null +++ b/databases/elasticsearch/files/elasticsearch.sh @@ -0,0 +1,53 @@ +#! @RCD_SCRIPTS_SHELL@ +# +# $NetBSD: elasticsearch.sh,v 1.1 2014/04/16 17:22:14 imil Exp $ +# +# PROVIDE: elasticsearch +# REQUIRE: DAEMON +# + +. /etc/rc.subr + +name="elasticsearch" +rcvar=$name +pidfile="@ES_PIDDIR@/elasticsearch.pid" +required_files="@PKG_SYSCONFDIR@/elasticsearch.yml" +start_precmd="elasticsearch_precmd" + +: ${elasticsearch_user:=@ES_USER@} +: ${elasticsearch_group:=@ES_GROUP@} +: ${elasticsearch_config:="@PKG_SYSCONFDIR@/elasticsearch.yml"} +: ${elasticsearch_min_mem:="256m"} +: ${elasticsearch_max_mem:="1g"} +: ${elasticsearch_props:=""} + +ES_CLASSPATH="@ES_LIBDIR@/@DISTNAME@.jar:@ES_LIBDIR@/*" + +command="@PKG_JAVA_HOME@/bin/java" +# flags taken from bin/elasticsearch and bin/elasticsearch.in.sh +command_args=" -Delasticsearch \ + -Des.pidfile=${pidfile} \ + -Des.config=${elasticsearch_config} \ + -Xms${elasticsearch_min_mem} \ + -Xmx${elasticsearch_max_mem} \ + -Xss256k \ + -Djava.awt.headless=true \ + -XX:+UseParNewGC \ + -XX:+UseConcMarkSweepGC \ + -XX:CMSInitiatingOccupancyFraction=75 \ + -XX:+UseCMSInitiatingOccupancyOnly \ + -XX:+HeapDumpOnOutOfMemoryError \ + -XX:+UseCMSInitiatingOccupancyOnly \ + -cp ${ES_CLASSPATH} \ + ${elasticsearch_props} \ + org.elasticsearch.bootstrap.Elasticsearch \ + >/dev/null &" + +elasticsearch_precmd() +{ + @TOUCH@ ${pidfile} + @CHOWN@ ${elasticsearch_user}:${elasticsearch_group} ${pidfile} +} + +load_rc_config "$name" +run_rc_command "$1" diff --git a/databases/elasticsearch/patches/patch-config_elasticsearch.yml b/databases/elasticsearch/patches/patch-config_elasticsearch.yml new file mode 100644 index 00000000000..8f2eb76d077 --- /dev/null +++ b/databases/elasticsearch/patches/patch-config_elasticsearch.yml @@ -0,0 +1,37 @@ +$NetBSD: patch-config_elasticsearch.yml,v 1.1 2014/04/16 17:22:14 imil Exp $ + +Define various paths + +--- config/elasticsearch.yml.orig 2014-03-25 15:38:22.000000000 +0000 ++++ config/elasticsearch.yml +@@ -143,10 +143,12 @@ + # Path to directory containing configuration (this file and logging.yml): + # + # path.conf: /path/to/conf ++path.conf: %%PKG_SYSCONFDIR%% + + # Path to directory where to store index data allocated for this node. + # + # path.data: /path/to/data ++path.data: %%VARBASE%%/db/elasticsearch + # + # Can optionally include more than one location, causing data to be striped across + # the locations (a la RAID 0) on a file level, favouring locations with most free +@@ -157,14 +159,16 @@ + # Path to temporary files: + # + # path.work: /path/to/work +- ++path.work: %%ES_TMPDIR%% + # Path to log files: + # + # path.logs: /path/to/logs ++path.logs: %%VARBASE%%/log/elasticsearch + + # Path to where plugins are installed: + # + # path.plugins: /path/to/plugins ++path.plugins: %%PREFIX%%/lib/elasticsearch/plugins + + + #################################### Plugin ################################### |