freebsd-ports/devel/opengrok/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

77 lines
2.7 KiB
Makefile

PORTNAME= opengrok
PORTVERSION= 1.7.31
CATEGORIES= devel java
MASTER_SITES= https://github.com/oracle/opengrok/releases/download/${PORTVERSION}/
MAINTAINER= truckman@FreeBSD.org
COMMENT= Fast and powerful code search and cross-reference engine
WWW= https://opengrok.github.io/OpenGrok/
LICENSE= CDDL ADAIC BSD3CLAUSE EPL ECMA MIT RUBY
LICENSE_COMB= multi
LICENSE_NAME_ADAIC= Ada Reference Manual, ISO/IEC 8652:2007(E) Ed. 3
LICENSE_NAME_ECMA= Ecma International
LICENSE_FILE_CDDL= ${WRKSRC}/doc/LICENSE.txt
LICENSE_FILE_ADAIC= ${WRKSRC}/doc/LICENSE-adaic.org.txt
LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/doc/LICENSE-scala.txt
LICENSE_FILE_EPL= ${WRKSRC}/doc/LICENSE-eclipse.txt
LICENSE_FILE_ECMA= ${WRKSRC}/doc/LICENSE-ecma.txt
LICENSE_FILE_MIT= ${WRKSRC}/doc/LICENSE-mandoc.txt
LICENSE_FILE_RUBY= ${WRKSRC}/doc/LICENSE-ruby.txt
LICENSE_PERMS_ADAIC= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
LICENSE_PERMS_ECMA= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
RUN_DEPENDS= uctags:devel/universal-ctags
USES= cpe
CPE_VENDOR= oracle
USE_JAVA= yes
JAVA_VERSION= 11+
SHAREOWN= www
SHAREGRP= www
NO_BUILD= yes
NO_ARCH= yes
PORTDOCS= README.md logging.properties.template
SUB_FILES= opengrok pkg-message
SUB_LIST+= JARFILE="${JARFILE}"
PLIST_SUB= T=${WEBAPP_HOME:S|^${LOCALBASE}/||} \
OWNER=${SHAREOWN} GROUP=${SHAREGRP}
OPTIONS_DEFINE= DOCS
OPTIONS_SINGLE= AS
OPTIONS_SINGLE_AS= GLASSFISH TOMCAT10
OPTIONS_DEFAULT= TOMCAT10
GLASSFISH_DESC?= Glassfish support
GLASSFISH_VARS= WEBAPP_HOME=${LOCALBASE}/glassfish-5.1.0/glassfish
TOMCAT10_VARS= WEBAPP_HOME=${LOCALBASE}/apache-tomcat-10.0
GLASSFISH_BUILD_DEPENDS=${WEBAPP_HOME}/modules/glassfish.jar:www/glassfish
GLASSFISH_RUN_DEPENDS= ${WEBAPP_HOME}/modules/glassfish.jar:www/glassfish
TOMCAT10_BUILD_DEPENDS= ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat10
TOMCAT10_RUN_DEPENDS= ${WEBAPP_HOME}/bin/bootstrap.jar:www/tomcat10
WEBAPPS_DIR= ${WEBAPP_HOME:S|^${LOCALBASE}/||}/webapps
JARFILE= ${LOCALBASE}/${WEBAPPS_DIR}/opengrok/WEB-INF/lib/opengrok-${PORTVERSION}.jar
post-extract:
@${MKDIR} ${WRKSRC}/lib/opengrok
@${TAR} -xf ${WRKSRC}/lib/source.war -C ${WRKSRC}/lib/opengrok
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}/etc \
${STAGEDIR}${PREFIX}/${WEBAPPS_DIR}/${PORTNAME} \
${STAGEDIR}/var/log/opengrok
(cd ${WRKSRC}/lib/opengrok && ${COPYTREE_SHARE} . \
${STAGEDIR}${PREFIX}/${WEBAPPS_DIR}/${PORTNAME})
(cd ${STAGEDIR}${PREFIX}/${WEBAPPS_DIR}/${PORTNAME}/WEB-INF && \
${MV} web.xml web.xml.sample)
${INSTALL_DATA} ${WRKSRC}/doc/logging.properties ${STAGEDIR}${DATADIR}/etc/logging.properties.sample
${INSTALL_SCRIPT} ${WRKDIR}/opengrok ${STAGEDIR}${PREFIX}/bin
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${STAGEDIR}${DOCSDIR}/
.include <bsd.port.mk>