freebsd-ports/net/opentracker/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

79 lines
2.3 KiB
Makefile

PORTNAME= opentracker
PORTVERSION= 0.2017.08.13
PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://www.bayofrum.net/dist/${PORTNAME}/
MAINTAINER= crees@FreeBSD.org
COMMENT= Free lightweight bittorrent tracker using libowfat
WWW= https://erdgeist.org/arts/software/opentracker/
BROKEN= fails to link: duplicate symbol: first_deferred, known libowfat issue
BUILD_DEPENDS= ${LOCALBASE}/lib/libowfat.a:devel/libowfat
USES= tar:bzip2
USE_RC_SUBR= ${PORTNAME} ${PORTNAME}-ipv6
OPTIONS_DEFINE= COMPRESSION_GZIP DEBUG_HTTPERROR FULLSCRAPE RESTRICT_STATS
OPTIONS_SINGLE= ACCESSLIST
OPTIONS_SINGLE_ACCESSLIST= ACCESSLIST_OPEN ACCESSLIST_BLACK \
ACCESSLIST_WHITE
OPTIONS_DEFAULT= FULLSCRAPE RESTRICT_STATS ACCESSLIST_OPEN
ACCESSLIST_OPEN_DESC= Disable black/whitelisting
ACCESSLIST_BLACK_DESC= Enable client blacklisting
ACCESSLIST_WHITE_DESC= Enable client whitelisting
COMPRESSION_GZIP_DESC= Deliver gzip compressed full scrapes
DEBUG_HTTPERROR_DESC= Verbose HTTPERRORs
FULLSCRAPE_DESC= Can query tracker for all torrents
RESTRICT_STATS_DESC= Limit stats access based on IP
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MACCESSLIST_BLACK}
FEATURES+=-DWANT_ACCESSLIST_BLACK
.elif ${PORT_OPTIONS:MACCESSLIST_WHITE}
FEATURES+=-DWANT_ACCESSLIST_WHITE
.endif
.if ${PORT_OPTIONS:MCOMPRESSION_GZIP}
FEATURES+=-DWANT_COMPRESSION_GZIP
.endif
.if ${PORT_OPTIONS:MDEBUG_HTTPERROR}
FEATURES+=-D_DEBUG_HTTPERROR
.endif
.if ${PORT_OPTIONS:MFULLSCRAPE}
FEATURES+=-DWANT_FULLSCRAPE
.endif
.if ${PORT_OPTIONS:MRESTRICT_STATS}
FEATURES+=-DWANT_RESTRICT_STATS
.endif
MAKE_ENV+=FEATURES="${FEATURES}"
post-patch:
@${FIND} ${WRKSRC} -name "*.orig" -delete
${LN} ${WRKSRC}/opentracker.c ${WRKSRC}/opentracker-ipv6.c
do-build:
${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${BUILD_WRKSRC} -DWANT_V6 \
BINARY=opentracker-ipv6
${MAKE_CMD} -C ${BUILD_WRKSRC} clean
${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${BUILD_WRKSRC}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-ipv6 ${STAGEDIR}${PREFIX}/bin/
${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample \
${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample \
${STAGEDIR}${ETCDIR}/${PORTNAME}-ipv6.conf.sample
.include <bsd.port.mk>