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

89 lines
2.7 KiB
Makefile

PORTNAME= moinmoin
PORTVERSION= 1.9.11
CATEGORIES= www python
MASTER_SITES= https://static.moinmo.in/files/
DISTNAME= moin-${PORTVERSION}
MAINTAINER= python@FreeBSD.org
COMMENT= Easy to use, full-featured and extensible wiki software package
WWW= https://moinmo.in/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/docs/licenses/COPYING
USES= cpe python:2.7 shebangfix
USE_PYTHON= distutils
NO_ARCH= yes
CPE_VENDOR= moinmo
PYDISTUTILS_PKGNAME= moin
SHEBANG_FILES= wiki/server/moin*
PLIST_SUB+= PYTHON_SITELIB=${PYTHON_SITELIBDIR:S|^${LOCALBASE}/||} \
DATADIR=share/moin
SUB_FILES= pkg-install
SUB_LIST= MOINDIR=${MOINDIR} MOINDEST=${MOINDEST} MOINVER=${MOINVER} \
HTDOCS=${PYTHON_SITELIBDIR}/MoinMoin/web/static/htdocs
OPTIONS_DEFINE= RECAPTCHA VERIFYEMAIL
OPTIONS_DEFAULT= RECAPTCHA VERIFYEMAIL
OPTIONS_SUB= yes
RECAPTCHA_DESC= reCAPTCHA v2 support
VERIFYEMAIL_DESC= Support for verifying new account email addresses
RECAPTCHA_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-recaptchav2
VERIFYEMAIL_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-verifyemail
CGIUSER?= www
CGIGROUP?= www
MOINDIR= ${PREFIX}/share/moin
MOINDEST?= ${PREFIX}/www/wiki
MOINVER?= ${PORTVERSION:S|.||g}
MOINTYPE?= CGI
PKGDEINSTALL= ${PKGINSTALL}
.if ${MOINTYPE} == "STANDALONE"
MOINSCRIPT= ${MOINDIR}/server/moin
.elif ${MOINTYPE} == "FCGI"
MOINSCRIPT= ${MOINDIR}/server/moin.fcgi
.elif ${MOINTYPE} == "MOD_PYTHON"
.elif ${MOINTYPE} == "CGI"
MOINSCRIPT= ${MOINDIR}/server/moin.cgi
.elif ${MOINTYPE} == "WSGI"
MOINSCRIPT= ${MOINDIR}/server/moin.wsgi
.else
BROKEN= MOINTYPE must be a STANDALONE, FCGI, WSGI, MOD_PYTHON, or CGI
.endif
pre-everything::
@${ECHO}
@${ECHO} "Set MOINTYPE=(CGI|FCGI|WSGI|STANDALONE) to define"
@${ECHO} "type of installation. Default is CGI."
@${ECHO} "Use MOINDEST=/path to modify installation destination."
@${ECHO} "Default value for MOINDEST is ${PREFIX}/www/wiki."
@${ECHO}
@${ECHO} "To get correct permissions, please set CGIUSER, CGIGROUP"
@${ECHO} "per default it is set to www:www."
@${ECHO}
instance: pre-everything apply-slist
@${ECHO_CMD} "Creating a new wiki instance in ${MOINDEST}."; \
if [ -f ${MOINDIR}/config/wikiconfig.py ]; then \
${MKDIR} ${MOINDEST}; \
${CP} -R ${MOINDIR}/data ${MOINDEST}; \
${CP} -R ${MOINDIR}/underlay ${MOINDEST}; \
${CHMOD} -R u+rw,go-ws ${MOINDEST}/data; \
${INSTALL_SCRIPT} ${MOINDIR}/config/wikiconfig.py ${MOINDEST}; \
if [ ! -z ${MOINSCRIPT} ]; then \
${INSTALL_SCRIPT} ${MOINSCRIPT} ${MOINDEST}; \
fi; \
${CHOWN} -R ${CGIUSER}:${CGIGROUP} ${MOINDEST}; \
${SH} ${PKGINSTALL} ${PKGNAME} INSTANCE ${MOINTYPE}; \
else \
${ECHO_CMD} "You need to install moinmoin first before trying"; \
${ECHO_CMD} "to add a new wiki instance."; \
fi
.include <bsd.port.mk>