1 | # $Id$ |
---|
2 | # vim: set fileencoding=utf-8 tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab filetype=tcl : |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name elasticsearch |
---|
7 | version 0.90.5 |
---|
8 | revision 0 |
---|
9 | categories java databases |
---|
10 | maintainers semenov.co:ilya |
---|
11 | platforms darwin |
---|
12 | |
---|
13 | description ElasticSearch is a flexible and powerful open source, distributed real-time \ |
---|
14 | search and analytics engine for the cloud |
---|
15 | |
---|
16 | homepage http://elasticsearch.org |
---|
17 | master_sites https://download.elasticsearch.org/elasticsearch/elasticsearch |
---|
18 | checksums sha256 f14ff217039b5c398a9256b68f46a90093e0a1e54e89f94ee6a2ee7de557bd6d |
---|
19 | |
---|
20 | depends_lib bin:java:kaffe |
---|
21 | conflicts ${name} |
---|
22 | use_configure no |
---|
23 | |
---|
24 | set dbuser elasticsearch |
---|
25 | set dbgrp elasticsearch |
---|
26 | set es_parent ${prefix}/share/java |
---|
27 | set es_home ${es_parent}/${name} |
---|
28 | set pidfile ${prefix}/var/run/${name}/pid |
---|
29 | |
---|
30 | add_users ${dbuser} shell=/bin/sh group=${dbgrp} \ |
---|
31 | home=${es_home} \ |
---|
32 | realname=Elasticsearch Server |
---|
33 | |
---|
34 | build {} |
---|
35 | |
---|
36 | destroot { |
---|
37 | xinstall -m 755 -d ${destroot}${es_parent} |
---|
38 | file copy ${worksrcpath} ${destroot}${es_home} |
---|
39 | xinstall -m 700 -o ${dbuser} -g ${dbgrp} -d ${destroot}${es_home}/data |
---|
40 | xinstall -m 755 -o ${dbuser} -g ${dbgrp} -d ${destroot}${es_home}/logs |
---|
41 | xinstall -m 755 -o ${dbuser} -g ${dbgrp} -d ${destroot}${prefix}/var/run/${name} |
---|
42 | } |
---|
43 | |
---|
44 | destroot.keepdirs ${destroot}${es_home}/data \ |
---|
45 | ${destroot}${es_home}/logs \ |
---|
46 | ${destroot}${prefix}/var/run/${name} |
---|
47 | |
---|
48 | startupitem.create yes |
---|
49 | startupitem.logfile ${prefix}/var/log/elasticsearch.log |
---|
50 | startupitem.logevents yes |
---|
51 | startupitem.pidfile auto ${pidfile} |
---|
52 | startupitem.start "su ${dbuser} -c \"${es_home}/bin/elasticsearch -p ${pidfile}\"" |
---|
53 | startupitem.stop "su ${dbuser} -c \"kill `cat ${pidfile}`\"" |
---|