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 tomcat8 |
---|
7 | version 8.5.8 |
---|
8 | categories java www |
---|
9 | platforms darwin |
---|
10 | maintainers nomaintainer |
---|
11 | license Apache-2 |
---|
12 | supported_archs noarch |
---|
13 | |
---|
14 | description Tomcat 8 HTTP Server and Java Servlet Container. |
---|
15 | long_description Apache Tomcat is an open source software implementation \ |
---|
16 | of the Java Servlet, JavaServer Pages, Java Expression \ |
---|
17 | Language and Java WebSocket technologies. |
---|
18 | |
---|
19 | homepage http://tomcat.apache.org/ |
---|
20 | master_sites apache:tomcat/tomcat-8/v${version}/bin |
---|
21 | distname apache-tomcat-${version} |
---|
22 | checksums rmd160 a3debd65cedfaea47c8fbd0c7769d4eea9ec249b \ |
---|
23 | sha256 40f7ee2804bd7dcca4d85f1b74317474de161b41863019965d37817a12d2dce5 |
---|
24 | |
---|
25 | depends_lib bin:java:kaffe |
---|
26 | use_configure no |
---|
27 | build {} |
---|
28 | |
---|
29 | set catalina_home ${destroot}${prefix}/share/java/${name} |
---|
30 | set tomcat_user tomcat |
---|
31 | set tomcat_group tomcat |
---|
32 | add_users ${tomcat_user} group=${tomcat_group} |
---|
33 | |
---|
34 | destroot.keepdirs ${catalina_home}/logs \ |
---|
35 | ${catalina_home}/work \ |
---|
36 | ${catalina_home}/temp |
---|
37 | |
---|
38 | pre-destroot { |
---|
39 | # remove windows *.bat files |
---|
40 | foreach f [glob -directory ${worksrcpath}/bin *.bat] { |
---|
41 | file delete $f |
---|
42 | } |
---|
43 | } |
---|
44 | |
---|
45 | destroot { |
---|
46 | xinstall -m 750 -g ${tomcat_group} -d ${catalina_home} |
---|
47 | xinstall -m 750 -o ${tomcat_user} -g ${tomcat_group} -d ${catalina_home}/logs |
---|
48 | xinstall -m 750 -o ${tomcat_user} -g ${tomcat_group} -d ${catalina_home}/work |
---|
49 | xinstall -m 750 -o ${tomcat_user} -g ${tomcat_group} -d ${catalina_home}/temp |
---|
50 | |
---|
51 | file copy \ |
---|
52 | ${worksrcpath}/LICENSE \ |
---|
53 | ${worksrcpath}/NOTICE \ |
---|
54 | ${worksrcpath}/RELEASE-NOTES \ |
---|
55 | ${worksrcpath}/RUNNING.txt \ |
---|
56 | ${worksrcpath}/bin \ |
---|
57 | ${worksrcpath}/conf \ |
---|
58 | ${worksrcpath}/lib \ |
---|
59 | ${worksrcpath}/webapps \ |
---|
60 | ${catalina_home} |
---|
61 | |
---|
62 | xinstall -m 640 ${filespath}/setenv.sh ${catalina_home}/bin/setenv.sh.default |
---|
63 | |
---|
64 | # replace @PREFIX@ to ${prefix} |
---|
65 | reinplace "s|@PREFIX@|${prefix}|g" ${catalina_home}/bin/setenv.sh.default |
---|
66 | # replace @NAME@ to ${name} |
---|
67 | reinplace "s|@NAME@|${name}|g" ${catalina_home}/bin/setenv.sh.default |
---|
68 | } |
---|
69 | |
---|
70 | post-activate { |
---|
71 | if {![file exists ${prefix}/share/java/${name}/bin/setenv.sh]} { |
---|
72 | file copy ${prefix}/share/java/${name}/bin/setenv.sh.default \ |
---|
73 | ${prefix}/share/java/${name}/bin/setenv.sh |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | startupitem.create yes |
---|
78 | startupitem.start "${prefix}/share/java/${name}/bin/catalina.sh start" |
---|
79 | startupitem.stop "${prefix}/share/java/${name}/bin/catalina.sh stop" |
---|
80 | startupitem.pidfile auto "${prefix}/var/run/${name}.pid" |
---|
81 | startupitem.netchange yes |
---|
82 | |
---|
83 | livecheck.type regex |
---|
84 | livecheck.url ${homepage}/download-80.cgi |
---|
85 | livecheck.regex "apache-tomcat-(\\d+\\.\\d+(\\.\\d+)?).tar.gz" |
---|