Ticket #49517: Portfile

File Portfile, 2.0 KB (added by ldeck, 9 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
6name                sonarqube
7license             BSD
8version             5.1.2
9categories          java www
10platforms           darwin
11
12maintainers         nomaintainer
13description         SonarQube is an open platform to manage code quality.
14long_description    SonarQube is an open platform to manage code quality.
15
16homepage            http://www.sonarqube.org/
17master_sites        https://sonarsource.bintray.com/Distribution/sonarqube/
18
19checksums           md5  b626939d25d2ffa84c53d76ffbf5fae9 \
20                    rmd160  70a299b501eb65807a209f84891d13a31f70ff19 \
21                    sha256  a8d63d837242d0d07c0b3f65cfa9c84d5ae82ee51c6cbb52248bcf0d1bc58491
22
23use_zip             yes
24platforms           darwin
25supported_archs     noarch
26use_configure       no
27build               {}
28
29post-build {
30    foreach f [glob ${worksrcpath}/bin/linux* ${worksrcpath}/bin/solaris* ${worksrcpath}/bin/windows*] {file delete -force -- $f}
31    reinplace -W ${worksrcpath}/conf "s|#sonar.web.javaOpts|sonar.web.javaOpts|g" sonar.properties
32    reinplace -W ${worksrcpath}/conf "s|#sonar.web.javaAdditionalOpts=|sonar.web.javaAdditionalopts=-server|g" sonar.properties
33}
34
35destroot {
36    set sonardir ${destroot}${prefix}/share/${name}
37    set platform "macosx-universal-64"
38    set finalroot ${prefix}/share/${name}/${name}-${version}
39
40    xinstall -m 755 -d ${sonardir}
41    file copy ${worksrcpath} ${sonardir}
42
43    ln -s ${finalroot}/bin/${platform}/sonar.sh ${destroot}${prefix}/bin/sonar
44}
45
46livecheck.type     regex
47livecheck.url      ${homepage}/downloads/
48livecheck.regex    "SonarQube (\\d+(?:\\.\\d+)*)"
49
50
51startupitem.create      yes
52startupitem.logfile     ${prefix}/var/log/${name}.log
53startupitem.logevents   yes
54startupitem.netchange   no
55startupitem.start       ${prefix}/bin/sonar start
56startupitem.stop        ${prefix}/bin/sonar stop
57startupitem.restart     ${prefix}/bin/sonar restart