summaryrefslogtreecommitdiff
path: root/www/jakarta-tomcat/Makefile
blob: a3d0c1c8de16db701ad2f7a07408f232452390fa (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
# $NetBSD: Makefile,v 1.18 2001/03/29 23:26:24 jwise Exp $

DISTNAME=	${PKGNAME}-src
PKGNAME=	jakarta-tomcat-3.2.1
CATEGORIES=	www
MASTER_SITES=	http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/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-*:../../www/jakarta-servletapi

USE_JAVA=	yes
WRKSRC=		${WRKDIR}/${DISTNAME}

CLASSPATH:=	${LOCALBASE}/lib/java/servlet.jar:${LOCALBASE}/lib/jaxp.jar:${LOCALBASE}/lib/parser.jar:${CLASSPATH}
MAKEFILE=	build.xml
MAKE_FLAGS+=	-Dpkgsrc.prefix=${PREFIX}
MAKE_ENV+=	JAVA_HOME=${JAVA_HOME} CLASSPATH=${CLASSPATH}
ALL_TARGET=	main
INSTALL_TARGET=	dist

DEINSTALL_FILE=		${PKGDIR}/DEINSTALL
INSTALL_FILE=		${WRKDIR}/INSTALL

post-patch:
	${SED}	-e "s|@PREFIX@|${PREFIX}|g"				\
		-e "s|@JAVA_HOME@|${JAVA_HOME}|g"			\
		${WRKSRC}/src/etc/workers.properties > ${WRKSRC}/src/etc/workers.properties.tmp
		${MV} ${WRKSRC}/src/etc/workers.properties.tmp ${WRKSRC}/src/etc/workers.properties

post-build:
	${SED}	-e "s|@PREFIX@|${PREFIX}|g"				\
		${FILESDIR}/tomcat.sh > ${WRKDIR}/tomcat.sh

pre-install:
	${SED}	-e "s|@CAT@|${CAT}|g"					\
		-e "s|@CHMOD@|${CHMOD}|g"				\
		-e "s|@CP@|${CP}|g"					\
		${PKGDIR}/INSTALL > ${INSTALL_FILE}

post-install:
	${INSTALL_SCRIPT} ${WRKDIR}/tomcat.sh ${PREFIX}/etc/rc.d/tomcat
	PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL

.include "../../mk/bsd.pkg.mk"
MAKE_PROGRAM=	${LOCALBASE}/bin/ant