1 | # -*- 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 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name logstash |
---|
7 | version 1.4.2 |
---|
8 | categories java sysutils |
---|
9 | maintainers yahoo.fr:jul_bsd openmaintainer |
---|
10 | platforms darwin |
---|
11 | |
---|
12 | description open source log management |
---|
13 | long_description logstash is a tool for managing events and logs. You \ |
---|
14 | can use it to collect logs, parse them, and store \ |
---|
15 | them for later use (like, for searching). Speaking \ |
---|
16 | of searching, logstash comes with a web interface \ |
---|
17 | for searching and drilling into all of your logs. |
---|
18 | license APL-2 |
---|
19 | |
---|
20 | homepage http://logstash.net/ |
---|
21 | master_sites https://download.elasticsearch.org/logstash/logstash/ |
---|
22 | # OR https://github.com/elasticsearch/logstash/releases |
---|
23 | |
---|
24 | depends_lib bin:java:kaffe |
---|
25 | depends_run port:elasticsearch |
---|
26 | |
---|
27 | use_configure no |
---|
28 | |
---|
29 | set es_parent ${prefix}/share/java |
---|
30 | set es_home ${es_parent}/${name} |
---|
31 | set pidfile ${prefix}/var/run/${name}/pid |
---|
32 | |
---|
33 | add_users logstash shell=/bin/sh group=logstash \ |
---|
34 | home=${es_home} \ |
---|
35 | realname=Logstash\ Server |
---|
36 | |
---|
37 | build {} |
---|
38 | |
---|
39 | destroot { |
---|
40 | xinstall -m 755 -d ${destroot}${es_parent} |
---|
41 | file copy ${worksrcpath} ${destroot}${es_home} |
---|
42 | } |
---|
43 | |
---|
44 | test.run yes |
---|
45 | test.cmd "/bin/echo 'hello world' | ${es_home}/bin/logstash agent -e 'input { stdin { type => stdin } } output { stdout { codec => rubydebug } }'" |
---|
46 | |
---|
47 | destroot.keepdirs \ |
---|
48 | ${destroot}${prefix}/var/run/${name} \ |
---|
49 | ${destroot}${prefix}/var/log/${name} |
---|
50 | |
---|
51 | startupitem.create yes |
---|
52 | startupitem.logfile ${prefix}/var/log/logstash.log |
---|
53 | startupitem.logevents yes |
---|
54 | startupitem.pidfile auto ${pidfile} |
---|
55 | #startupitem.start "su ${dbuser} -c \"java -jar ${es_home}/logstash-1.1.0-monolithic.jar agent -f ${prefix}/etc/${name}/logstash.conf -- web --backend elasticsearch:///?local\"" |
---|
56 | #startupitem.stop "su ${dbuser} -c \"kill `cat ${pidfile}`\"" |
---|
57 | |
---|
58 | if {${subport} eq ${name}} { |
---|
59 | checksums rmd160 04894204b9cdd4e7a59df7b9b1e52e0a95bebc36 \ |
---|
60 | sha256 d5be171af8d4ca966a0c731fc34f5deeee9d7631319e3660d1df99e43c5f8069 |
---|
61 | |
---|
62 | conflicts ${name}-devel |
---|
63 | |
---|
64 | livecheck.type regex |
---|
65 | livecheck.url https://github.com/elasticsearch/logstash/releases |
---|
66 | livecheck.regex "<a href=\"/elasticsearch/logstash/releases/tag/v(.*)\">" |
---|
67 | } |
---|
68 | |
---|
69 | subport ${name}-devel { |
---|
70 | fetch.type git |
---|
71 | git.url https://github.com/elasticsearch/logstash.git |
---|
72 | version 20140821 |
---|
73 | git.branch dbe6b33d100e240a9a5cc09510e81048189186ef |
---|
74 | |
---|
75 | depends_lib-append port:jruby |
---|
76 | |
---|
77 | # pre-configure { |
---|
78 | # } |
---|
79 | |
---|
80 | conflicts ${name} |
---|
81 | livecheck.type none |
---|
82 | } |
---|
83 | |
---|
84 | notes " |
---|
85 | To enable ${name} as background daemon: |
---|
86 | $ sudo ln -s ${prefix}/Library/LaunchDaemons/org.macports.${name}.plist /Library/LaunchDaemons/ |
---|
87 | $ sudo launchctl load -w /Library/LaunchDaemons/org.macports.${name}.plist |
---|
88 | " |
---|