svn commit: r475385 - head/www/tomcat9
Steve Wills
swills at FreeBSD.org
Thu Jul 26 16:42:36 UTC 2018
Author: swills
Date: Thu Jul 26 16:42:35 2018
New Revision: 475385
URL: https://svnweb.freebsd.org/changeset/ports/475385
Log:
www/tomcat9: mark additional config files with @sample
While here, modernize and pet portlint
PR: 229973
Submitted by: VVD <vvd at unislabs.com> (maintainer)
Modified:
head/www/tomcat9/Makefile (contents, props changed)
head/www/tomcat9/pkg-plist (contents, props changed)
Modified: head/www/tomcat9/Makefile
==============================================================================
--- head/www/tomcat9/Makefile Thu Jul 26 16:12:04 2018 (r475384)
+++ head/www/tomcat9/Makefile Thu Jul 26 16:42:35 2018 (r475385)
@@ -17,78 +17,59 @@ RUN_DEPENDS= jsvc:devel/jakarta-commons-daemon
USES= cpe
CPE_VENDOR= apache
-
USE_JAVA= yes
JAVA_VERSION= 1.8+
-NO_BUILD= yes
-NO_ARCH= yes
-
USE_RC_SUBR= ${PKGBASE:C/-/_/}
-TOMCAT_SUBDIR?= ${DISTNAME:C/([0-9])\.([0-9])(.*)/\1.\2/}
-TOMCAT_HOME= ${PREFIX}/${TOMCAT_SUBDIR}
-TOMCAT_CONF_FILES= \
- catalina.policy catalina.properties context.xml logging.properties \
- server.xml tomcat-users.xml tomcat-users.xsd web.xml \
- jaspic-providers.xml jaspic-providers.xsd
-
-OPTIONS_DEFINE= HOST_MANAGER MANAGER DOCS EXAMPLES ROOT
-HOST_MANAGER_DESC= Install Host Manager application
-MANAGER_DESC= Install Manager web application
-DOCS_DESC= Install Documentation web application
-EXAMPLES_DESC= Install Examples web application
-ROOT_DESC= Install default ROOT web application
-OPTIONS_DEFAULT= HOST_MANAGER MANAGER DOCS EXAMPLES ROOT
-OPTIONS_SUB= yes
-
+NO_ARCH= yes
+NO_BUILD= yes
PLIST_SUB= T=${TOMCAT_SUBDIR} \
- WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
-
+ WWWOWN=${WWWOWN} \
+ WWWGRP=${WWWGRP}
SUB_LIST= TOMCAT_HOME=${TOMCAT_HOME} \
TOMCAT_USER=${WWWOWN} \
JAVA_HOME=${JAVA_HOME}
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE= HOST_MANAGER MANAGER DOCS EXAMPLES ROOT
+OPTIONS_DEFAULT= HOST_MANAGER MANAGER DOCS EXAMPLES ROOT
+OPTIONS_SUB= yes
-pre-patch:
- @${ECHO_MSG} "Installation settings:"
- @${ECHO_MSG} " Destination directory: ${TOMCAT_HOME}"
- @${ECHO_MSG} " Location of JDK: ${JAVA_HOME}"
- @${ECHO_MSG} " Location of Java port: ${JAVA_PORT}"
+DOCS_DESC= Install Documentation web application
+EXAMPLES_DESC= Install Examples web application
+HOST_MANAGER_DESC= Install Host Manager application
+MANAGER_DESC= Install Manager web application
+ROOT_DESC= Install default ROOT web application
-post-patch:
- @${FIND} ${WRKSRC} -name '*.bat' -delete
-.for f in ${TOMCAT_CONF_FILES}
- @${MV} ${WRKSRC}/conf/${f} ${WRKSRC}/conf/${f}.sample
-.endfor
+TOMCAT_SUBDIR?= ${DISTNAME:R}
+TOMCAT_HOME= ${PREFIX}/${TOMCAT_SUBDIR}
do-install:
- @${ECHO_MSG} -n ">> Creating destination directory..."
@${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/logs
@${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/endorsed
- @${ECHO_MSG} " [ DONE ]"
+ ${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME}
- @${ECHO_MSG} -n ">> Copying files to destination directory..."
- @${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME}
-.if !${PORT_OPTIONS:MHOST_MANAGER}
+post-install:
+ @${RM} ${STAGEDIR}${TOMCAT_HOME}/bin/*.bat
+ (cd ${STAGEDIR}${TOMCAT_HOME}/conf &&\
+ for f in $$(find . -type f); do ${MV} $$f $$f.sample; done)
+ (cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\
+ for f in host-manager/META-INF/context.xml host-manager/WEB-INF/web.xml \
+ manager/META-INF/context.xml manager/WEB-INF/web.xml; do \
+ ${MV} $$f $$f.sample; done)
+
+post-install-HOST_MANAGER-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/host-manager
-.endif
-.if !${PORT_OPTIONS:MMANAGER}
+
+post-install-MANAGER-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/manager
-.endif
-.if !${PORT_OPTIONS:MDOCS}
+
+post-install-DOCS-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/docs
-.endif
-.if !${PORT_OPTIONS:MEXAMPLES}
+
+post-install-EXAMPLES-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/examples
-.endif
-.if !${PORT_OPTIONS:MROOT}
+
+post-install-ROOT-off:
@${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/ROOT
-.endif
- @${ECHO_MSG} " [ DONE ]"
- @${ECHO_MSG} -n ">> Fixing permissions..."
- @${FIND} ${STAGEDIR}${TOMCAT_HOME} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
- @${ECHO_MSG} " [ DONE ]"
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Modified: head/www/tomcat9/pkg-plist
==============================================================================
--- head/www/tomcat9/pkg-plist Thu Jul 26 16:12:04 2018 (r475384)
+++ head/www/tomcat9/pkg-plist Thu Jul 26 16:42:35 2018 (r475385)
@@ -18,22 +18,6 @@
%%T%%/bin/tomcat-native.tar.gz
%%T%%/bin/tool-wrapper.sh
%%T%%/bin/version.sh
- at owner %%WWWOWN%%
- at group %%WWWGRP%%
- at sample %%T%%/conf/catalina.policy.sample
- at sample %%T%%/conf/catalina.properties.sample
- at sample %%T%%/conf/context.xml.sample
- at sample %%T%%/conf/jaspic-providers.xml.sample
- at sample %%T%%/conf/jaspic-providers.xsd.sample
- at sample %%T%%/conf/logging.properties.sample
- at sample %%T%%/conf/server.xml.sample
- at sample %%T%%/conf/tomcat-users.xml.sample
- at sample %%T%%/conf/tomcat-users.xsd.sample
- at sample %%T%%/conf/web.xml.sample
- at dir %%T%%/conf
- at owner
- at group
- at dir %%T%%/endorsed
%%T%%/lib/annotations-api.jar
%%T%%/lib/catalina-ant.jar
%%T%%/lib/catalina-ha.jar
@@ -59,25 +43,26 @@
%%T%%/lib/tomcat-util.jar
%%T%%/lib/tomcat-websocket.jar
%%T%%/lib/websocket-api.jar
+ at dir %%T%%/endorsed
+ at postunexec [ ! -d %D/%%T%% ] || echo If permanently deleting this package, %D/%%T%% must be removed manually
@owner %%WWWOWN%%
@group %%WWWGRP%%
+ at dir %%T%%/conf
@dir %%T%%/logs
-%%T%%/temp/safeToDelete.tmp
@dir %%T%%/temp
-%%ROOT%%%%T%%/webapps/ROOT/RELEASE-NOTES.txt
-%%ROOT%%%%T%%/webapps/ROOT/WEB-INF/web.xml
-%%ROOT%%%%T%%/webapps/ROOT/asf-logo-wide.svg
-%%ROOT%%%%T%%/webapps/ROOT/bg-button.png
-%%ROOT%%%%T%%/webapps/ROOT/bg-middle.png
-%%ROOT%%%%T%%/webapps/ROOT/bg-nav.png
-%%ROOT%%%%T%%/webapps/ROOT/bg-upper.png
-%%ROOT%%%%T%%/webapps/ROOT/favicon.ico
-%%ROOT%%%%T%%/webapps/ROOT/index.jsp
-%%ROOT%%%%T%%/webapps/ROOT/tomcat-power.gif
-%%ROOT%%%%T%%/webapps/ROOT/tomcat.css
-%%ROOT%%%%T%%/webapps/ROOT/tomcat.gif
-%%ROOT%%%%T%%/webapps/ROOT/tomcat.png
-%%ROOT%%%%T%%/webapps/ROOT/tomcat.svg
+ at dir %%T%%/webapps
+ at dir %%T%%/work
+ at sample %%T%%/conf/catalina.policy.sample
+ at sample %%T%%/conf/catalina.properties.sample
+ at sample %%T%%/conf/context.xml.sample
+ at sample %%T%%/conf/jaspic-providers.xml.sample
+ at sample %%T%%/conf/jaspic-providers.xsd.sample
+ at sample %%T%%/conf/logging.properties.sample
+ at sample %%T%%/conf/server.xml.sample
+ at sample %%T%%/conf/tomcat-users.xml.sample
+ at sample %%T%%/conf/tomcat-users.xsd.sample
+ at sample %%T%%/conf/web.xml.sample
+%%T%%/temp/safeToDelete.tmp
%%DOCS%%%%T%%/webapps/docs/BUILDING.txt
%%DOCS%%%%T%%/webapps/docs/RELEASE-NOTES.txt
%%DOCS%%%%T%%/webapps/docs/RUNNING.txt
@@ -606,16 +591,16 @@
%%EXAMPLES%%%%T%%/webapps/examples/websocket/echo.xhtml
%%EXAMPLES%%%%T%%/webapps/examples/websocket/index.xhtml
%%EXAMPLES%%%%T%%/webapps/examples/websocket/snake.xhtml
-%%HOST_MANAGER%%%%T%%/webapps/host-manager/META-INF/context.xml
+ at sample %%HOST_MANAGER%%%%T%%/webapps/host-manager/META-INF/context.xml.sample
%%HOST_MANAGER%%%%T%%/webapps/host-manager/WEB-INF/jsp/401.jsp
%%HOST_MANAGER%%%%T%%/webapps/host-manager/WEB-INF/jsp/403.jsp
%%HOST_MANAGER%%%%T%%/webapps/host-manager/WEB-INF/jsp/404.jsp
-%%HOST_MANAGER%%%%T%%/webapps/host-manager/WEB-INF/web.xml
+ at sample %%HOST_MANAGER%%%%T%%/webapps/host-manager/WEB-INF/web.xml.sample
%%HOST_MANAGER%%%%T%%/webapps/host-manager/images/asf-logo.svg
%%HOST_MANAGER%%%%T%%/webapps/host-manager/images/tomcat.gif
%%HOST_MANAGER%%%%T%%/webapps/host-manager/index.jsp
%%HOST_MANAGER%%%%T%%/webapps/host-manager/manager.xml
-%%MANAGER%%%%T%%/webapps/manager/META-INF/context.xml
+ at sample %%MANAGER%%%%T%%/webapps/manager/META-INF/context.xml.sample
%%MANAGER%%%%T%%/webapps/manager/WEB-INF/jsp/401.jsp
%%MANAGER%%%%T%%/webapps/manager/WEB-INF/jsp/403.jsp
%%MANAGER%%%%T%%/webapps/manager/WEB-INF/jsp/404.jsp
@@ -624,14 +609,23 @@
%%MANAGER%%%%T%%/webapps/manager/WEB-INF/jsp/connectorTrustedCerts.jsp
%%MANAGER%%%%T%%/webapps/manager/WEB-INF/jsp/sessionDetail.jsp
%%MANAGER%%%%T%%/webapps/manager/WEB-INF/jsp/sessionsList.jsp
-%%MANAGER%%%%T%%/webapps/manager/WEB-INF/web.xml
+ at sample %%MANAGER%%%%T%%/webapps/manager/WEB-INF/web.xml.sample
%%MANAGER%%%%T%%/webapps/manager/images/asf-logo.svg
%%MANAGER%%%%T%%/webapps/manager/images/tomcat.gif
%%MANAGER%%%%T%%/webapps/manager/index.jsp
%%MANAGER%%%%T%%/webapps/manager/status.xsd
%%MANAGER%%%%T%%/webapps/manager/xform.xsl
- at dir %%T%%/webapps
- at dir %%T%%/work
- at owner
- at group
- at postunexec [ ! -d %D/%%T%% ] || echo If permanently deleting this package, %D/%%T%% must be removed manually
+%%ROOT%%%%T%%/webapps/ROOT/RELEASE-NOTES.txt
+%%ROOT%%%%T%%/webapps/ROOT/WEB-INF/web.xml
+%%ROOT%%%%T%%/webapps/ROOT/asf-logo-wide.svg
+%%ROOT%%%%T%%/webapps/ROOT/bg-button.png
+%%ROOT%%%%T%%/webapps/ROOT/bg-middle.png
+%%ROOT%%%%T%%/webapps/ROOT/bg-nav.png
+%%ROOT%%%%T%%/webapps/ROOT/bg-upper.png
+%%ROOT%%%%T%%/webapps/ROOT/favicon.ico
+%%ROOT%%%%T%%/webapps/ROOT/index.jsp
+%%ROOT%%%%T%%/webapps/ROOT/tomcat-power.gif
+%%ROOT%%%%T%%/webapps/ROOT/tomcat.css
+%%ROOT%%%%T%%/webapps/ROOT/tomcat.gif
+%%ROOT%%%%T%%/webapps/ROOT/tomcat.png
+%%ROOT%%%%T%%/webapps/ROOT/tomcat.svg
More information about the svn-ports-all
mailing list