freebsd-ports/www/validator/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

73 lines
2.4 KiB
Makefile

PORTNAME= validator
DISTVERSIONPREFIX= ${PORTNAME}-
DISTVERSION= 1_3
DISTVERSIONSUFFIX= -release
PORTREVISION= 5
CATEGORIES= www
MAINTAINER= cyberbotx@cyberbotx.com
COMMENT= Markup Validation Service from the World Wide Web Consortium (W3C)
WWW= https://validator.w3.org/
LICENSE= W3C2002
LICENSE_NAME= W3C Software Notice and License (2002/12/31)
LICENSE_TEXT= See https://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
RUN_DEPENDS= onsgmls:textproc/opensp \
p5-CGI>=0:www/p5-CGI \
p5-Config-General>=0:devel/p5-Config-General \
p5-Encode-HanExtra>=0:chinese/p5-Encode-HanExtra \
p5-Encode-JIS2K>=0:converters/p5-Encode-JIS2K \
p5-HTML-Parser>=0:www/p5-HTML-Parser \
p5-HTML-Encoding>=0:www/p5-HTML-Encoding \
p5-HTML-Template>=0:www/p5-HTML-Template \
p5-libwww>=5.817:www/p5-libwww \
p5-JSON>=0:converters/p5-JSON \
p5-LWP-Protocol-https>=0:www/p5-LWP-Protocol-https \
p5-Net-IP>=0:net-mgmt/p5-Net-IP \
p5-SGML-Parser-OpenSP>=0:textproc/p5-SGML-Parser-OpenSP \
p5-URI>=0:net/p5-URI \
p5-XML-LibXML>=0:textproc/p5-XML-LibXML
USES= perl5 shebangfix
USE_GITHUB= yes
GH_ACCOUNT= w3c
GH_PROJECT= markup-validator
NO_ARCH= yes
NO_BUILD= yes
USE_PERL5= run
SHEBANG_FILES= httpd/cgi-bin/check \
httpd/cgi-bin/sendfeedback.pl
SUB_FILES= pkg-message
OPTIONS_DEFINE= HTML_TIDY
OPTIONS_DEFAULT=HTML_TIDY
HTML_TIDY_DESC= Enable HTML Markup Cleaning
HTML_TIDY_RUN_DEPENDS= p5-HTML-Tidy>=0:textproc/p5-HTML-Tidy
post-patch:
@${REINPLACE_CMD} -e 's|%%WWWDIR%%|${WWWDIR}|' \
${WRKSRC}/htdocs/config/validator.conf \
${WRKSRC}/httpd/cgi-bin/check \
${WRKSRC}/httpd/cgi-bin/sendfeedback.pl \
${WRKSRC}/httpd/conf/httpd.conf
pre-install:
${MV} ${WRKSRC}/htdocs/config/validator.conf \
${WRKSRC}/htdocs/config/validator.conf.sample
${MV} ${WRKSRC}/httpd/conf/httpd.conf \
${WRKSRC}/httpd/conf/httpd.conf.sample
${FIND} ${WRKSRC} \( -name \*.bak -or -name \*.orig \) -delete
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/www/validator/htdocs
${MKDIR} ${STAGEDIR}${PREFIX}/www/validator/httpd
${MKDIR} ${STAGEDIR}${PREFIX}/www/validator/share
(cd ${WRKSRC}/htdocs && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/htdocs/)
(cd ${WRKSRC}/httpd && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/httpd/)
(cd ${WRKSRC}/share && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/share/)
.include <bsd.port.mk>