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

107 lines
3.5 KiB
Makefile

PORTNAME= ikiwiki
DISTVERSION= 3.20200202.3
CATEGORIES= www
MASTER_SITES= DEBIAN_POOL \
LOCAL/mat/${PORTNAME}
DISTNAME= ${PORTNAME}_${DISTVERSION}
EXTRACT_SUFX= .orig.tar.xz
MAINTAINER= mat@FreeBSD.org
COMMENT= Wiki compiler
WWW= https://ikiwiki.info/
LICENSE= GPLv2
BUILD_DEPENDS= p5-CGI-FormBuilder>=0:www/p5-CGI-FormBuilder \
p5-CGI-Session>=0:www/p5-CGI-Session \
p5-HTML-Parser>=0:www/p5-HTML-Parser \
p5-HTML-Scrubber>=0:www/p5-HTML-Scrubber \
p5-HTML-Template>=0:www/p5-HTML-Template \
p5-Locale-gettext>=0:devel/p5-Locale-gettext \
p5-Mail-Sendmail>=0:mail/p5-Mail-Sendmail \
p5-Text-Markdown>=0:textproc/p5-Text-Markdown \
p5-TimeDate>=0:devel/p5-TimeDate \
p5-URI>=0:net/p5-URI \
p5-XML-Simple>=0:textproc/p5-XML-Simple \
p5-YAML-LibYAML>=0:textproc/p5-YAML-LibYAML \
p5-YAML>=0:textproc/p5-YAML
RUN_DEPENDS:= ${BUILD_DEPENDS} \
p5-Authen-Passphrase>=0:security/p5-Authen-Passphrase \
p5-File-MimeInfo>=0:devel/p5-File-MimeInfo \
p5-LWPx-ParanoidAgent>=0:www/p5-LWPx-ParanoidAgent \
p5-RPC-XML>=0:net/p5-RPC-XML \
p5-XML-Feed>=0:textproc/p5-XML-Feed
TEST_DEPENDS= p5-IPC-Run>=0:devel/p5-IPC-Run
USES= cpe gettext gmake perl5 python shebangfix
USE_PERL5= configure
SHEBANG_FILES= plugins/*
CONFIGURE_ARGS= FULLPERL=${PERL} \
PERL=${PERL}
MAKE_ENV= SYSCONFDIR=${ETCDIR} \
W3M_CGI_BIN=${PREFIX}/libexec/w3m/cgi-bin
NO_ARCH= yes
WRKSRC= ${WRKDIR}/${DISTNAME:S/_/-/}
PORTDOCS= CHANGELOG NEWS README
PORTEXAMPLES= *
OPTIONS_DEFINE= DOCS EXAMPLES MULTI PO4A SEARCH W3M
OPTIONS_DEFAULT= MULTI PO4A SEARCH
OPTIONS_SUB=
MULTI_DESC= Install Text::MultiMarkdown
PO4A_DESC= Install translated underlays
SEARCH_DESC= Install search backend
W3M_DESC= Install w3m CGI wrapper
MULTI_RUN_DEPENDS= p5-Text-MultiMarkdown>=0:textproc/p5-Text-MultiMarkdown
PO4A_BUILD_DEPENDS= po4a>=0.39:textproc/po4a
PO4A_RUN_DEPENDS= po4a>=0.39:textproc/po4a
SEARCH_RUN_DEPENDS= ${LOCALBASE}/www/xapian-omega/cgi-bin/omega:www/xapian-omega \
p5-Digest-SHA1>=0:security/p5-Digest-SHA1 \
p5-Search-Xapian>=0:databases/p5-Search-Xapian
post-patch:
@${REINPLACE_CMD} -i '' \
-e 's|/usr/bin/markdown|${LOCALBASE}/bin/markdown|' \
${WRKSRC}/IkiWiki/Plugin/mdwn.pm
@${REINPLACE_CMD} -i '' \
-e 's|/etc/ikiwiki|${ETCDIR}|' \
${WRKSRC}/auto.setup ${WRKSRC}/auto-blog.setup \
${WRKSRC}/doc/ikiwiki-mass-rebuild.mdwn \
${WRKSRC}/doc/ikiwiki-update-wikilist.mdwn
@${REINPLACE_CMD} -i '' \
-e 's|$$(PREFIX)/share/man|$$(PREFIX)/man|; \
s|share/ikiwiki/examples|${EXAMPLESDIR_REL}|; \
s|\./pm_filter|$$(PERL) &|' \
${WRKSRC}/Makefile.PL
@${REINPLACE_CMD} -i '' \
-e 's|share/ikiwiki/examples|${EXAMPLESDIR_REL}|' \
${WRKSRC}/IkiWiki/Setup/Automator.pm
@${REINPLACE_CMD} -i '' \
-e 's|/usr/lib/cgi-bin/omega/omega|${LOCALBASE}/www/xapian-omega/cgi-bin/omega|g' \
${WRKSRC}/IkiWiki/Plugin/search.pm
@${REINPLACE_CMD} -i '' \
-e 's|/etc/highlight|${LOCALBASE}/etc/highlight|; \
s|/usr/share/highlight|${LOCALBASE}/share/highlight|' \
${WRKSRC}/IkiWiki/Plugin/highlight.pm
post-install:
for i in ${STAGEDIR}${ETCDIR}/*; do ${MV} $$i $$i.sample; done
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S@^@${WRKSRC}/@} ${STAGEDIR}${DOCSDIR}
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/ikiwiki.setup ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/wikilist ${STAGEDIR}${EXAMPLESDIR}
@${RMDIR} ${STAGEDIR}${EXAMPLESDIR}/doc/examples
@${RMDIR} ${STAGEDIR}${EXAMPLESDIR}/doc
.include <bsd.port.mk>