freebsd-ports/news/leafnode/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

82 lines
2.7 KiB
Makefile

PORTNAME= leafnode
DISTVERSION= 1.12.0
CATEGORIES= news
MASTER_SITES= SF \
LOCAL/mandree/
MAINTAINER= mandree@FreeBSD.org
COMMENT= NNTP package for offline news caching and reading
WWW= https://www.leafnode.org/
LICENSE= GPLv2+
LIB_DEPENDS= libpcre2-8.so:devel/pcre2
USES= cpe tar:xz
GNU_CONFIGURE= yes
CONFLICTS= newsx-1* s-news-0*
OPTIONS_DEFINE= DOCS
.include <bsd.port.pre.mk>
# TODO: remove this auto-selection, and tell users through UPDATING to
# move their spool to /var/spool/leafnode, and run texpire -r
.if exists(/var/spool/news/leaf.node) && !defined(PACKAGE_BUILDING)
LEAFNODE_SPOOLDIR?= /var/spool/news
.elif exists(${LOCALBASE}/var/spool/leafnode/leaf.node) && !defined(PACKAGE_BUILDING)
LEAFNODE_SPOOLDIR?= ${LOCALBASE}/var/spool/leafnode
.endif
LEAFNODE_SPOOLDIR?= /var/spool/leafnode
PLIST_SUB+= REALPREFIX=${PREFIX} \
SPOOLDIR=${LEAFNODE_SPOOLDIR}
CONFIGURE_ARGS= --exec-prefix=${PREFIX} \
--sysconfdir=${PREFIX}/etc/leafnode \
--with-ipv6 \
--with-spooldir=${LEAFNODE_SPOOLDIR}
SUB_FILES= pkg-deinstall pkg-install pkg-message
SUB_LIST= SPOOLDIR=${LEAFNODE_SPOOLDIR}
TEST_TARGET= check
MAN1_DE= leafnode-version.1 newsq.1
MAN8_DE= applyfilter.8 checkgroups.8 fetchnews.8 leafnode.8 texpire.8
MANLANG= "" de.ISO8859-1
MAN1DIR_DE= ${MAN1PREFIX}/man/de.ISO8859-1/man1
MAN8DIR_DE= ${MAN8PREFIX}/man/de.ISO8859-1/man8
DOCS= ADD-ONS ChangeLog COPYING CREDITS FAQ.txt FAQ.pdf FAQ.html \
INSTALL NEWS README ChangeLog.old README-FQDN README-FQDN.html \
leafnode.cron.daily leafnode-SA-2002-01.txt \
leafnode-SA-2003-01.txt leafnode-SA-2004-01.txt \
leafnode-SA-2005-01.txt leafnode-SA-2005-02.txt KNOWNBUGS
DOCS_DE= INSTALL_de README README_de
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= *
.endif
pre-configure:
@${ECHO_MSG}
@${ECHO_MSG} "------------------------------------------------------------------------"
@${ECHO_MSG} "This port will use ${LEAFNODE_SPOOLDIR} as spool directory."
@${ECHO_MSG} "Use LEAFNODE_SPOOLDIR=d to specify d as spool directory."
@${ECHO_MSG} "------------------------------------------------------------------------"
@${ECHO_MSG}
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/UNINSTALL-daemontools ${STAGEDIR}${PREFIX}/etc/leafnode/
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
${MKDIR} ${STAGEDIR}${DOCSDIR}/german
cd ${WRKSRC}/doc_german && ${INSTALL_DATA} ${DOCS_DE} ${STAGEDIR}${DOCSDIR}/german
.endif
${MKDIR} ${STAGEDIR}${MAN1DIR_DE} ${STAGEDIR}${MAN8DIR_DE}
cd ${WRKSRC}/doc_german && \
${INSTALL_MAN} ${MAN1_DE} ${STAGEDIR}${MAN1PREFIX}/man/de.ISO8859-1/man1 && \
${INSTALL_MAN} ${MAN8_DE} ${STAGEDIR}${MAN8PREFIX}/man/de.ISO8859-1/man8
.include <bsd.port.post.mk>