e7af7b2e05
If ${FILESDIR}/getsite.sh exists, then use it to determine the fetch URL for each of the distfiles for the package. Otherwise, use SITE_<file> and MASTER_SITES, in order, to determine the URL for each distfile. If the script path differs from ${FILESDIR}/getsite.sh, then set DYNAMIC_SITE_SCRIPT to the full path to that script. Remove the need to set DYNAMIC_MASTER_SITES explicitly in the package Makefile for: graphics/ns-cult3d wm/sawfish-themes www/apache-tomcat55 www/jakarta-tomcat4 www/jakarta-tomcat5
80 lines
2.3 KiB
Makefile
80 lines
2.3 KiB
Makefile
# $NetBSD: Makefile,v 1.8 2006/07/27 15:16:44 jlam Exp $
|
|
|
|
DISTNAME= apache-tomcat-${TOMCAT_VERSION}
|
|
CATEGORIES= www java
|
|
# The list of sites to download is generated by an apache website.
|
|
# The getsite.sh script parses the HTML and extracts the urls.
|
|
|
|
MAINTAINER= abs@NetBSD.org
|
|
HOMEPAGE= http://tomcat.apache.org/
|
|
COMMENT= The Apache Project's Java Servlet 2.4 and JSP 2.0 server
|
|
|
|
TOMCAT_VERSION= 5.5.17
|
|
|
|
USE_JAVA= run
|
|
# This needs java 1.5 or higher.
|
|
USE_JAVA2= 1.5
|
|
|
|
TOMCAT_LIB= ${PREFIX}/tomcat
|
|
CATALINA_DIR= Catalina/localhost
|
|
|
|
EGDIR= ${TOMCAT_LIB}/share/examples/apache-tomcat
|
|
EGDIR2= ${EGDIR}/${CATALINA_DIR}
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
# Work around a bug in NetBSD 2.0's pax-as-tar (bin/27228)
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-2.0*)
|
|
EXTRACT_USING= gtar
|
|
.endif
|
|
|
|
PKG_SYSCONFDIR.apache-tomcat= ${TOMCAT_LIB}/conf
|
|
MAKE_DIRS= ${PKG_SYSCONFDIR.apache-tomcat}/${CATALINA_DIR}
|
|
|
|
CONFLICTS+= jakarta-tomcat55-[0-9]*
|
|
CONFLICTS+= jakarta-tomcat-[0-9]*
|
|
|
|
RCD_SCRIPTS= tomcat
|
|
CFILES= server.xml web.xml tomcat-users.xml
|
|
CFILES+= catalina.policy catalina.properties
|
|
CF2FILES= manager.xml
|
|
|
|
CONF_FILES= # empty
|
|
.for f in ${CFILES}
|
|
CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
|
|
.endfor
|
|
.for f in ${CF2FILES}
|
|
CONF_FILES+= ${EGDIR2}/${f} ${PKG_SYSCONFDIR}/${CATALINA_DIR}/${f}
|
|
.endfor
|
|
|
|
FILES_SUBST+= JAVA_HOME=${PKG_JAVA_HOME:Q} TOMCAT_LIB=${TOMCAT_LIB:Q}
|
|
|
|
# If we were going to build jsvc, this would be a start
|
|
# post-extract:
|
|
# @(cd ${WRKSRC} && ${GZCAT} bin/jsvc.tar.gz | ${TAR} xf - )
|
|
#
|
|
# post-configure:
|
|
# @(cd ${WRKSRC}/jsvc-src ; ${SH} ./configure)
|
|
|
|
do-build:
|
|
@${MV} ${WRKSRC}/conf ${WRKDIR}
|
|
do-install:
|
|
${INSTALL_DATA_DIR} ${EGDIR2}
|
|
.for f in ${CFILES}
|
|
${INSTALL_DATA} ${WRKDIR}/conf/${f} ${EGDIR}
|
|
.endfor
|
|
.for f in ${CF2FILES}
|
|
${INSTALL_DATA} ${WRKDIR}/conf/${CATALINA_DIR}/${f} ${EGDIR2}
|
|
.endfor
|
|
${INSTALL_DATA_DIR} ${TOMCAT_LIB}
|
|
${RM} -r ${WRKSRC}/temp/*
|
|
@(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"
|