summaryrefslogtreecommitdiff
path: root/www/jakarta-tomcat/Makefile
blob: 86b96948c58e4f0217477650a2d068f38e3bd258 (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
# $NetBSD: Makefile,v 1.40 2003/08/23 15:26:27 jschauma Exp $

DISTNAME=	jakarta-tomcat-${TOMCAT_VERSION}-src
PKGNAME=	${DISTNAME:S/-src$//}
TOMCAT_VERSION=	3.2.4
PKGREVISION=	1
WRKSRC=		${WRKDIR}/${DISTNAME}
CATEGORIES=	www java
MASTER_SITES=	http://jakarta.apache.org/builds/jakarta-tomcat/release/v${TOMCAT_VERSION}/src/

MAINTAINER=	jwise@NetBSD.org
HOMEPAGE=	http://jakarta.apache.org/
COMMENT=	The Apache Project's Java Servlet 2.2 and JSP 1.1 server

DEPENDS+=	jakarta-servletapi-[0-9]*:../../www/jakarta-servletapi
DEPENDS+=	apache-ant>=1.4.1:../../devel/apache-ant

USE_BUILDLINK2=	yes
MAKEFILE=	build.xml
ALL_TARGET=	main
INSTALL_TARGET=	dist

SAMPLECONFDIR=			${PREFIX}/tomcat/conf
PKG_SYSCONFDIR.jakarta-tomcat=	${SAMPLECONFDIR}

USE_PKGINSTALL=	yes
OWN_DIRS=	${PREFIX}/tomcat
OWN_DIRS+=	${PREFIX}/tomcat/conf
OWN_DIRS+=	${PREFIX}/tomcat/logs
OWN_DIRS+=	${PREFIX}/tomcat/webapps
CFILES=		server.xml web.xml tomcat-users.xml jni_server.xml
CFILES+=	tomcat.policy workers.properties

CONF_FILES=	# empty
.for FILE in ${CFILES}
CONF_FILES+=	${SAMPLECONFDIR}/${FILE}.default ${PKG_SYSCONFDIR}/${FILE}
.endfor
RCD_SCRIPTS=	tomcat

FILES_SUBST+=	JAVA_HOME=${PKG_JAVA_HOME}

post-patch:
	${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM} -f
	for file in ${WRKSRC}/src/etc/workers.properties; do		\
		${SED}	-e "s|@PREFIX@|${PREFIX}|g"			\
			-e "s|@JAVA_HOME@|${PKG_JAVA_HOME}|g"		\
			$$file > $$file.tmp;				\
		${MV} -f $$file.tmp $$file;				\
	done

post-install:
	${RM} ${PREFIX}/tomcat/webapps/examples.war

.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"

MAKE_PROGRAM=	${LOCALBASE}/bin/ant
MAKE_FLAGS=	-Dpkgsrc.prefix=${PREFIX}
CLASSPATH:=	${LOCALBASE}/lib/java/servlet.jar:${LOCALBASE}/lib/jaxp.jar:${LOCALBASE}/lib/parser.jar:${CLASSPATH}