2020-10-15 18:27:21 +02:00
|
|
|
# $NetBSD: Makefile,v 1.43 2020/10/15 16:27:21 otis Exp $
|
2011-11-19 18:11:10 +01:00
|
|
|
|
|
|
|
DISTNAME= apache-tomcat-${TOMCAT_VER}
|
|
|
|
CATEGORIES= www
|
|
|
|
MASTER_SITES= ${MASTER_SITE_APACHE:=tomcat/tomcat-7/v${TOMCAT_VER}/bin/}
|
2017-09-03 13:19:16 +02:00
|
|
|
MASTER_SITES+= https://archive.apache.org/dist/tomcat/tomcat-7/v${TOMCAT_VER}/bin/
|
2011-11-19 18:11:10 +01:00
|
|
|
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2020-01-19 00:30:43 +01:00
|
|
|
HOMEPAGE= https://tomcat.apache.org/
|
2011-11-19 18:11:10 +01:00
|
|
|
COMMENT= Implementation of Java Servlet and JavaServer Pages technologies
|
2011-11-19 18:13:09 +01:00
|
|
|
LICENSE= apache-2.0
|
2011-11-19 18:11:10 +01:00
|
|
|
|
2020-10-15 18:27:21 +02:00
|
|
|
CONFLICTS+= apache-tomcat55-[0-9]*
|
|
|
|
CONFLICTS+= apache-tomcat6-[0-9]*
|
|
|
|
CONFLICTS+= apache-tomcat8-[0-9]*
|
|
|
|
CONFLICTS+= apache-tomcat85-[0-9]*
|
|
|
|
CONFLICTS+= apache-tomcat9-[0-9]*
|
2011-11-19 18:11:10 +01:00
|
|
|
|
|
|
|
NO_BUILD= yes
|
|
|
|
USE_LANGUAGES= # none
|
|
|
|
USE_JAVA= run
|
2012-05-06 10:08:16 +02:00
|
|
|
USE_JAVA2= 6
|
2011-11-19 18:11:10 +01:00
|
|
|
USE_TOOLS+= pax
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2020-10-15 18:27:21 +02:00
|
|
|
TOMCAT_VER= 7.0.106
|
2011-11-19 18:11:10 +01:00
|
|
|
TOMCAT_HOME= ${PREFIX}/share/tomcat
|
|
|
|
EGDIR= ${PREFIX}/share/examples/tomcat
|
|
|
|
DOCDIR= ${PREFIX}/share/doc/tomcat
|
|
|
|
RCD_SCRIPTS= tomcat
|
2014-03-11 15:34:36 +01:00
|
|
|
SMF_NAME= tomcat
|
2011-11-19 18:11:10 +01:00
|
|
|
TOMCAT_USER?= tomcat
|
|
|
|
TOMCAT_GROUP?= tomcat
|
|
|
|
PKG_GROUPS= ${TOMCAT_GROUP}
|
|
|
|
PKG_USERS= ${TOMCAT_USER}:${TOMCAT_GROUP}
|
|
|
|
PKG_GROUPS_VARS+= TOMCAT_GROUP
|
|
|
|
PKG_USERS_VARS+= TOMCAT_USER
|
|
|
|
PKG_HOME.tomcat= ${TOMCAT_HOME}
|
|
|
|
PKG_SHELL.tomcat= ${SH}
|
|
|
|
PKG_SYSCONFDIR.tomcat= ${TOMCAT_HOME}/conf
|
2012-11-23 12:46:24 +01:00
|
|
|
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR.tomcat} ${TOMCAT_USER} ${TOMCAT_GROUP} 0755
|
2011-11-19 18:11:10 +01:00
|
|
|
FILES_SUBST+= JAVA_HOME=${PKG_JAVA_HOME} TOMCAT_HOME=${TOMCAT_HOME} \
|
|
|
|
TOMCAT_USER=${TOMCAT_USER} TOMCAT_GROUP=${TOMCAT_GROUP}
|
|
|
|
|
|
|
|
PRIVATE_EGFILES= server.xml tomcat-users.xml
|
|
|
|
PUBLIC_EGFILES= catalina.policy catalina.properties \
|
|
|
|
context.xml logging.properties web.xml
|
|
|
|
DOCFILES= LICENSE NOTICE RELEASE-NOTES RUNNING.txt
|
|
|
|
WORK_DIRS= work temp logs
|
|
|
|
|
|
|
|
.for f in ${PRIVATE_EGFILES}
|
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/${f} ${PKG_SYSCONFDIR.tomcat}/${f} \
|
|
|
|
${TOMCAT_USER} ${TOMCAT_GROUP} 0640
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for f in ${PUBLIC_EGFILES}
|
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/${f} ${PKG_SYSCONFDIR.tomcat}/${f} \
|
|
|
|
${TOMCAT_USER} ${TOMCAT_GROUP} 0644
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for d in ${WORK_DIRS}
|
|
|
|
OWN_DIRS_PERMS+= ${TOMCAT_HOME}/${d} ${TOMCAT_USER} ${TOMCAT_GROUP} 0755
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
INSTALLATION_DIRS+= ${TOMCAT_HOME} ${EGDIR} ${DOCDIR}
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
.for d in ${WORK_DIRS}
|
|
|
|
${RM} -rf ${WRKSRC}/${d}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for f in ${DOCFILES}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${DOCDIR}/${f}
|
|
|
|
${RM} -f ${WRKSRC}/${f}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for f in ${PRIVATE_EGFILES}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/conf/${f} ${DESTDIR}${EGDIR}/${f}
|
|
|
|
${RM} -f ${WRKSRC}/conf/${f}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for f in ${PUBLIC_EGFILES}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/conf/${f} ${DESTDIR}${EGDIR}/${f}
|
|
|
|
${RM} -f ${WRKSRC}/conf/${f}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
${FIND} ${WRKSRC} -name \*.exe -type f -print | ${XARGS} ${RM} -f
|
|
|
|
${FIND} ${WRKSRC} -name \*.bat -type f -print | ${XARGS} ${RM} -f
|
|
|
|
|
|
|
|
cd ${WRKSRC} && ${PAX} -rw -pm . ${DESTDIR}${TOMCAT_HOME}
|
|
|
|
|
|
|
|
${FIND} ${DESTDIR}${TOMCAT_HOME} -type d -print | \
|
|
|
|
${XARGS} ${CHMOD} ${PKGDIRMODE}
|
|
|
|
${FIND} ${DESTDIR}${TOMCAT_HOME} -type f -print | \
|
|
|
|
${XARGS} ${CHMOD} ${SHAREMODE}
|
|
|
|
${FIND} ${DESTDIR}${TOMCAT_HOME} -type f -name \*.sh -print | \
|
|
|
|
${XARGS} ${CHMOD} ${BINMODE}
|
|
|
|
|
|
|
|
.include "../../mk/java-vm.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|