summaryrefslogtreecommitdiff
path: root/www/jakarta-tomcat/Makefile
blob: bd4f4dd0a0821fa400793280a62a2e7e573c9422 (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.10 2000/09/03 13:38:31 wiz Exp $

DISTNAME=	jakarta-tomcat.src
PKGNAME=	jakarta-tomcat-3.1
CATEGORIES=	www
MASTER_SITES=	http://jakarta.apache.org/builds/tomcat/release/v3.1/src/
DISTFILES=	jakarta-tomcat.tar.gz jakarta-tools.tar.gz jakarta-ant.tar.gz

MAINTAINER=	jwise@netbsd.org
HOMEPAGE=	http://jakarta.apache.org/

DIST_SUBDIR=	jakarta-3.1

USE_JAVA=	yes

WRKSRC=		${WRKDIR}/jakarta-tomcat

JAKARTA_HOME=	${PREFIX}/jakarta
MAKE_ENV+=	JAVA_HOME=${JAVA_HOME}

MESSAGE_FILE=	${WRKDIR}/MESSAGE

post-patch:
	${SED} -e s,@JAKARTA_HOME@,${JAKARTA_HOME},g \
		< ${WRKSRC}/build.xml > ${WRKSRC}/build.tmp
	${MV} ${WRKSRC}/build.tmp ${WRKSRC}/build.xml
	${SED} -e s,@LOCALBASE@,${LOCALBASE},g \
		< ${WRKSRC}/src/share/org/apache/tomcat/task/ApacheConfig.java \
		> ${WRKSRC}/src/share/org/apache/tomcat/task/ApacheConfig.java.tmp
	${MV} ${WRKSRC}/src/share/org/apache/tomcat/task/ApacheConfig.java.tmp \
		${WRKSRC}/src/share/org/apache/tomcat/task/ApacheConfig.java

do-build:
	cd ${WRKSRC}/../jakarta-ant && ${SH} bootstrap.sh
	cd ${WRKSRC} && ${SH} ./build.sh

post-build:
	${SED} 's,@TOMCAT_HOME@,${JAKARTA_HOME}/tomcat,g' \
		< ${PKGDIR}/MESSAGE > ${WRKDIR}/MESSAGE

do-install:
	${MKDIR} ${JAKARTA_HOME}/tomcat
	cd ${WRKSRC} && ${SH} ./build.sh dist
	${CHMOD} +x ${JAKARTA_HOME}/tomcat/bin/*.sh
	${RM} ${JAKARTA_HOME}/tomcat/bin/*.bat
	${RM} ${JAKARTA_HOME}/tomcat/bin/tomcat.sh.orig

.include "../../mk/bsd.pkg.mk"