Ticket #44822: Portfile

File Portfile, 3.6 KB (added by jul_bsd@…, 10 years ago)
Line 
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
4PortSystem          1.0
5
6PortGroup           github 1.0
7github.setup        elasticsearch kibana 4.0.0-beta1.1 v
8categories          www sysutils
9platforms           darwin
10maintainers         yahoo.fr:jul_bsd openmaintainer
11license             GPL-2
12
13description         browser based analytics and search interface
14long_description    Kibana is an open source (Apache Licensed), browser \
15                    based analytics and search interface to Logstash \
16                    and other timestamped data sets stored in \
17                    ElasticSearch. With those in place Kibana is a \
18                    snap to setup and start using (seriously). \
19                    Kibana strives to be easy to get started with, \
20                    while also being flexible and powerful
21license             APL-2
22supported_archs     noarch
23
24homepage            http://www.elasticsearch.org/overview/kibana/
25#master_sites        https://download.elasticsearch.org/kibana/kibana/
26# OR https://github.com/elasticsearch/kibana
27
28depends_run         port:elasticsearch
29
30set webroot          ${prefix}/www/${name}
31
32use_configure        no
33build {}
34
35destroot {
36    copy ${worksrcpath} ${destroot}/${webroot}/
37    xinstall -d ${destroot}${prefix}/share/examples/${name}
38    copy ${filespath}/nginx-${name}.conf ${destroot}${prefix}/share/examples/${name}/nginx-${name}.conf
39}
40
41post-activate {
42    if ![file exists ${prefix}/etc/nginx/nginx-${name}.conf] {
43        copy ${prefix}/share/examples/${name}/nginx-${name}.conf ${prefix}/etc/nginx/nginx-${name}.conf
44    }
45}
46
47if {${subport} eq ${name}} {
48
49    checksums           rmd160  2e6ce8f251e43e7be7780cb95ec9b906708473d6 \
50                        sha256  3b6a912a6d9d31c76e0ae015fa4fa80d01848a6255c5536631f7ab9695579496
51
52#    conflicts  ${name}-devel
53
54    livecheck.type      regex
55    livecheck.url       https://github.com/elasticsearch/kibana/releases
56    livecheck.regex     "<a href=\"/elasticsearch/kibana/releases/tag/v(.*)\">"
57}
58
59subport ${name}-devel {
60    version    20141024
61    master_sites    https://github.com/elasticsearch/kibana/archive/
62    distname        174333ba656050fa87fe4504f35111b53eff9f8c
63    checksums           rmd160  54f272032d7990f138f3d88c780df8daa2365edc \
64                        sha256  9e1579d8d6c51591a8f440509a42cab9b56323f7fe921953a0336980e0ad1a8d
65
66    #fetch.type git
67    #git.url    https://github.com/elasticsearch/kibana.git
68    #git.branch 8653abaa70f81252a30e0687a8ab317ca535d20c
69    worksrcdir ${name}-${distname}
70    use_zip    yes
71
72#    conflicts  ${name}
73    livecheck.type      none
74}
75
76subport ${name}3 {
77    version             3.1.1
78    distname            v${version}
79    checksums           rmd160  2e6ce8f251e43e7be7780cb95ec9b906708473d6 \
80                        sha256  3b6a912a6d9d31c76e0ae015fa4fa80d01848a6255c5536631f7ab9695579496
81}
82
83notes "
84**** To complete ${name} installation ****
85
861) Install Webserver (Apache, Nginx, ...)
872) Edit ${webroot}/config.js and check your elasticsearch server settings
883) Connect to your webserver. If localhost
89   http://localhost/${name}
90
91"
92
93if {![variant_isset apache2] && ![variant_isset nginx]} {
94    default_variants    +nginx
95}
96
97variant nginx description { use with nginx and nobody web user } conflicts apache2 {
98    depends_run           port:nginx
99    configure.args-append --with-web-user=nobody
100}
101
102variant apache2 description { use with apache2 and _www web user } conflicts nginx {
103    depends_run           port:apache2
104    configure.args-append --with-web-user=_www
105}
106