blob: 72d5dae2751be2a0d6fa3efee5f2d67bd386277e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# Created by: Alex Dupre <ale@FreeBSD.org>
# $FreeBSD$
PORTNAME= tomcat
PORTVERSION= 9.0.13
PORTREVISION= 1
CATEGORIES= www java
MASTER_SITES= APACHE/${PORTNAME}/${PORTNAME}-${PORTVERSION:C/([0-9])(.*)/\1/}/v${PORTVERSION}/bin
PKGNAMESUFFIX= 9
DISTNAME= apache-${PORTNAME}-${PORTVERSION}
MAINTAINER= vvd@unislabs.com
COMMENT= Open-source Java web server by Apache, 9.0.x branch
LICENSE= APACHE20
RUN_DEPENDS= jsvc:devel/jakarta-commons-daemon
USES= cpe
CPE_VENDOR= apache
USE_JAVA= yes
JAVA_VERSION= 1.8+
USE_RC_SUBR= ${PKGBASE:C/-/_/}
NO_ARCH= yes
NO_BUILD= yes
PLIST_SUB= T=${TOMCAT_SUBDIR} \
WWWOWN=${WWWOWN} \
WWWGRP=${WWWGRP}
SUB_LIST= TOMCAT_HOME=${TOMCAT_HOME} \
TOMCAT_USER=${WWWOWN} \
JAVA_HOME=${JAVA_HOME}
OPTIONS_DEFINE= HOST_MANAGER MANAGER DOCS EXAMPLES ROOT
OPTIONS_DEFAULT= HOST_MANAGER MANAGER ROOT
OPTIONS_SUB= yes
DOCS_DESC= Install Documentation web application
EXAMPLES_DESC= Install Examples web application
HOST_MANAGER_DESC= Install Host Manager application
MANAGER_DESC= Install Manager web application
ROOT_DESC= Install default ROOT web application
TOMCAT_SUBDIR?= ${DISTNAME:R}
TOMCAT_HOME= ${PREFIX}/${TOMCAT_SUBDIR}
post-patch:
@${RM} ${WRKSRC}/bin/commons-daemon-native.tar.gz ${WRKSRC}/bin/commons-daemon.jar ${WRKSRC}/bin/tomcat-native.tar.gz
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g; s|%%JAVAJARDIR%%|${JAVAJARDIR}|g' ${WRKSRC}/bin/daemon.sh
@${FIND} ${WRKSRC} -name '*.bak' -delete -o -name '*.orig' -delete
do-install:
@${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/logs
@${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/endorsed
${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME}
post-install:
@${RM} ${STAGEDIR}${TOMCAT_HOME}/bin/*.bat
(cd ${STAGEDIR}${TOMCAT_HOME}/conf &&\
for f in $$(find . -type f); do ${MV} $$f $$f.sample; done)
post-install-HOST_MANAGER-on:
(cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\
for f in host-manager/META-INF/context.xml host-manager/WEB-INF/web.xml; do \
${MV} $$f $$f.sample; done)
post-install-HOST_MANAGER-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/host-manager
post-install-MANAGER-on:
(cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\
for f in manager/META-INF/context.xml manager/WEB-INF/web.xml; do \
${MV} $$f $$f.sample; done)
post-install-MANAGER-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/manager
post-install-DOCS-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/docs
post-install-EXAMPLES-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/examples
post-install-ROOT-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/ROOT
.include <bsd.port.mk>
|