blob: 1ee0e2e8758d0d4fa0c8e41be474c28ebfdb6e87 (
plain)
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
|
# $NetBSD: Makefile,v 1.8 2005/07/15 18:27:54 jlam Exp $
DISTNAME= jakarta-tomcat-${TOMCAT_VERSION}
PKGREVISION= 1
CATEGORIES= www java
# The list of sites to download is generated by a jakarta website.
# The getsite.sh script parses the HTML and extracts the urls.
DYNAMIC_MASTER_SITES=1
MAINTAINER= abs@NetBSD.org
HOMEPAGE= http://jakarta.apache.org/tomcat/
COMMENT= The Apache Project's Java Servlet 2.4 and JSP 2.0 server
TOMCAT_VERSION= 5.5.9
# This needs java 1.5 or higher.
USE_JAVA2= 1.5
TOMCAT_LIB= ${PREFIX}/tomcat
CATALINA_DIR= Catalina/localhost
EGDIR= ${TOMCAT_LIB}/share/examples/jakarta-tomcat
EGDIR2= ${EGDIR}/${CATALINA_DIR}
USE_TOOLS+= gunzip tar
# Work around a horrible interaction with the gzip in NetBSD 2.0 (at least RC4)
# If gzip is used in a pipeline the tarfile fails to extract. PR bin/27228
EXTRACT_CMD= ${CP} ${DOWNLOADED_DISTFILE} ${WRKDIR}/tar.gz && ${GUNZIP_CMD} ${WRKDIR}/tar.gz && ${TAR} xf ${WRKDIR}/tar
PKG_SYSCONFDIR.jakarta-tomcat= ${TOMCAT_LIB}/conf
MAKE_DIRS= ${PKG_SYSCONFDIR.jakarta-tomcat}/${CATALINA_DIR}
USE_PKGINSTALL= yes
RCD_SCRIPTS= tomcat
CFILES= server.xml web.xml tomcat-users.xml
CFILES+= catalina.policy catalina.properties jk2.properties
CF2FILES= manager.xml
CONF_FILES= # empty
.for f in ${CFILES}
CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
.endfor
.undef f
.for f in ${CF2FILES}
CONF_FILES+= ${EGDIR2}/${f} ${PKG_SYSCONFDIR}/${CATALINA_DIR}/${f}
.endfor
.undef f
FILES_SUBST+= JAVA_HOME=${PKG_JVM_HOME} TOMCAT_LIB=${TOMCAT_LIB}
do-build:
@${MV} ${WRKSRC}/conf ${WRKDIR}
do-install:
${INSTALL_DATA_DIR} ${EGDIR2}
.for f in ${CFILES}
${INSTALL_DATA} ${WRKDIR}/conf/${f} ${EGDIR}
.endfor
.undef f
.for f in ${CF2FILES}
${INSTALL_DATA} ${WRKDIR}/conf/${CATALINA_DIR}/${f} ${EGDIR2}
.endfor
.undef f
${INSTALL_DATA_DIR} ${TOMCAT_LIB}
@(cd ${WRKSRC} && ${PAX} -rw -pm . ${TOMCAT_LIB}; \
${FIND} ${TOMCAT_LIB} -type f -print | ${XARGS} ${CHMOD} a+r; \
${FIND} ${TOMCAT_LIB} \( -type f -o -perm -u+x \) -print \
| ${XARGS} ${CHMOD} a+rx; \
${FIND} ${TOMCAT_LIB} -type d -print | ${XARGS} ${CHMOD} a+rx; \
${FIND} ${TOMCAT_LIB} -type f -name \*.bat -print | \
${XARGS} ${RM} -f)
.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"
|