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

90 lines
2.6 KiB
Makefile

PORTNAME= publicfile
PORTVERSION= 0.52
PORTREVISION= 3
CATEGORIES= www ftp
MASTER_SITES= http://cr.yp.to/publicfile/
MAINTAINER= ports@FreeBSD.org
COMMENT= Secure, read-only, anonymous HTTP/FTP server
WWW= https://cr.yp.to/publicfile.html
# Converted from LEGAL_TEXT
LICENSE= djb
LICENSE_NAME= djb
LICENSE_TEXT= No license -- see http://cr.yp.to/softwarelaw.html
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
RUN_DEPENDS= setuidgid:sysutils/daemontools \
tcpserver:sysutils/ucspi-tcp
OPTIONS_DEFINE= BASICAUTH COMMONLOG REDIRECT_SLASH ENV_FILETYPES SSL
BASICAUTH_DESC= basic HTTP authentication support
COMMONLOG_DESC= support for Apache common log format
REDIRECT_SLASH_DESC= do not require trailing slash on directories
ENV_FILETYPES_DESC= get mime types from the environment
SSL_DESC= provide SSL support through ucspi-ssl
CONFLICTS= xshttpd-3*
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MBASICAUTH} && ${PORT_OPTIONS:MCOMMONLOG}
BROKEN= common log and auth patches are currently in conflict
.endif
.if ${PORT_OPTIONS:MBASICAUTH} && ${PORT_OPTIONS:MREDIRECT_SLASH}
BROKEN= redirect slash and auth patches are currently in conflict
.endif
.if ${PORT_OPTIONS:MREDIRECT_SLASH}
pre-configure::
@${PATCH} -d ${PATCH_WRKSRC} ${PATCH_ARGS} < ${PATCHDIR}/redirect-slash-patch
.endif
.if ${PORT_OPTIONS:MENV_FILETYPES}
pre-configure::
@${PATCH} -d ${PATCH_WRKSRC} ${PATCH_ARGS} < ${PATCHDIR}/publicfile-0.52-filetype-diff
.endif
.if ${PORT_OPTIONS:MSSL}
pre-configure::
@${PATCH} -d ${PATCH_WRKSRC} ${PATCH_ARGS} < ${PATCHDIR}/publicfile.sslserver
RUN_DEPENDS+= sslserver:sysutils/ucspi-ssl
.endif
.if ${PORT_OPTIONS:MBASICAUTH}
pre-configure::
@${PATCH} -d ${PATCH_WRKSRC} ${PATCH_ARGS} -p1 < \
${PATCHDIR}/publicfile-0.52_basicauth.patch
PATCH_DEPENDS+= ${NONEXISTENT}:databases/cdb:extract
PLIST_SUB+= BASICAUTH=""
.else
PLIST_SUB+= BASICAUTH="@comment "
.endif
.if ${PORT_OPTIONS:MCOMMONLOG}
pre-configure::
@${PATCH} -d ${PATCH_WRKSRC} ${PATCH_ARGS} -p1 < \
${PATCHDIR}/publicfile-0.52-commonlog-2.patch
.endif
ALL_TARGET= it
INSTALL_TARGET= setup check
post-extract:
.if ${PORT_OPTIONS:MBASICAUTH}
@${LN} -s $$(${MAKE} -C ${PORTSDIR}/databases/cdb -V WRKSRC) ${WRKSRC}/cdb
.endif
post-patch:
@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} -s" > ${WRKSRC}/conf-ld
@${ECHO_CMD} "${PREFIX}" > ${WRKSRC}/conf-home
@${ECHO_CMD} "${STAGEDIR}${PREFIX}" > ${WRKSRC}/conf-stage
.if ${PORT_OPTIONS:MBASICAUTH}
@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/cdb/conf-cc
@${ECHO_CMD} "${CC} -s" > ${WRKSRC}/cdb/conf-ld
@${ECHO_CMD} "${PREFIX}" > ${WRKSRC}/cdb/conf-home
.endif
.include <bsd.port.mk>