freebsd-ports/sysutils/munin-node/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

103 lines
3.4 KiB
Makefile

PORTNAME= munin
PORTVERSION= ${MUNIN_VERSION}
CATEGORIES= sysutils perl5
MASTER_SITES= ${MUNIN_SITES}
PKGNAMESUFFIX= -node
MAINTAINER= mat@FreeBSD.org
COMMENT= Node-specific part of Munin
WWW= https://munin-monitoring.org/
BUILD_DEPENDS= bash:shells/bash \
munin-common>=${MUNIN_VERSION}:sysutils/munin-common \
p5-DateTime-HiRes>=0:devel/p5-DateTime-HiRes \
p5-Log-Log4perl>=0:devel/p5-Log-Log4perl \
p5-Module-Build>=0:devel/p5-Module-Build \
p5-Net-Server>=0:net/p5-Net-Server
RUN_DEPENDS= bash:shells/bash \
munin-common>=${MUNIN_VERSION}:sysutils/munin-common \
p5-Cache-Cache>=0:devel/p5-Cache-Cache \
p5-DateTime-HiRes>=0:devel/p5-DateTime-HiRes \
p5-libwww>=0:www/p5-libwww \
p5-List-MoreUtils>0:lang/p5-List-MoreUtils \
p5-Log-Log4perl>=0:devel/p5-Log-Log4perl \
p5-Net-CIDR>=0:net-mgmt/p5-Net-CIDR \
p5-Net-Server>=0:net/p5-Net-Server
USES= cpe gmake perl5 shebangfix
USE_RC_SUBR= munin-asyncd munin-node
SHEBANG_FILES= node/bin/munindoc node/sbin/munin-node \
node/sbin/munin-node-configure node/sbin/munin-run
.include "${.CURDIR}/../munin-common/munin.mk"
ALL_TARGET= build-node build-plugins build/node/_bin/munin-async \
build/node/_bin/munin-asyncd
INSTALL_TARGET= install-node-prime install-async-prime install-plugins-prime
REINPLACE_ARGS= -i ""
NO_ARCH= yes
PORTSCOUT= ignore:1
SUB_FILES= pkg-message plugins.conf
OPTIONS_DEFINE= JAVA PERL PYTHON SNMP
OPTIONS_DEFAULT= PERL PYTHON SNMP
OPTIONS_SUB= yes
JAVA_DESC= Include JAVA plugins
PERL_DESC= Include all Perl modules (adds dependencies)
PYTHON_DESC= Include Python plugins
SNMP_DESC= Include SNMP plugins
JAVA_USE= JAVA=yes
JAVA_INSTALL_TARGET= install-plugins-java
JAVA_VARS= JAVA_BUILD=yes \
JAVA_RUN=yes
PERL_RUN_DEPENDS= p5-DBD-Pg>=0:databases/p5-DBD-Pg \
p5-Net-DNS>=0:dns/p5-Net-DNS \
p5-Net-IP>=0:net-mgmt/p5-Net-IP \
p5-XML-LibXML>=0:textproc/p5-XML-LibXML \
p5-XML-Parser>=0:textproc/p5-XML-Parser
PYTHON_USES= python
SNMP_BUILD_DEPENDS= p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP
SNMP_RUN_DEPENDS= p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/node/sbin/munin-node \
${WRKSRC}/node/sbin/munin-node-configure \
${WRKSRC}/node/sbin/munin-run
@${RM} ${WRKSRC}/node/sbin/munin-node.bak \
${WRKSRC}/node/sbin/munin-node-configure.bak \
${WRKSRC}/node/sbin/munin-run.bak
@${REINPLACE_CMD} \
-e 's|^\(BASH[[:space:]]*:=\).*|\1 ${bash_CMD}|' \
-e 's|^\(JAVARUN[[:space:]]*:=\).*|\1 ${java_CMD}|' \
-e 's|^\(PERL[[:space:]]*:=\).*|\1 ${perl_CMD}|' \
-e 's|^\(PYTHON[[:space:]]*:=\).*|\1 ${python_CMD}|' \
-e 's|^\(RUBY[[:space:]]*:=\).*|\1 ${ruby_CMD}|' \
${WRKSRC}/Makefile.config
@${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete
post-install:
${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state ${STAGEDIR}${SPOOLDIR}/async
${INSTALL_SCRIPT} ${.CURDIR}/plugins/* ${STAGEDIR}${DATADIR}/plugins/
${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf \
${STAGEDIR}${ETCDIR}/munin-node.conf.sample
${INSTALL_DATA} ${WRKDIR}/plugins.conf \
${STAGEDIR}${ETCDIR}/plugins.conf.sample
(cd ${WRKSRC}/node/blib/bindoc; \
${INSTALL_MAN} munin-node-configure.1 munin-node.1 munin-run.1 ${STAGEDIR}${MAN1PREFIX}/man/man1; \
)
(cd ${WRKSRC}/build/doc; \
${INSTALL_MAN} munin-node.conf.5 ${STAGEDIR}${MAN5PREFIX}/man/man5; \
${INSTALL_MAN} munin.8 ${STAGEDIR}${MAN8PREFIX}/man/man8; \
)
${INSTALL_DATA} ${FILESDIR}/newsyslog ${STAGEDIR}${ETCDIR}/munin-node.newsyslog
.include <bsd.port.mk>