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

78 lines
2.5 KiB
Makefile

PORTNAME= ndpmon
PORTVERSION= 1.4.0
PORTREVISION= 8
CATEGORIES= net-mgmt
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-1.4/
MAINTAINER= pi@FreeBSD.org
COMMENT= On-link icmpv6 message monitoring and reporting daemon
WWW= http://ndpmon.sourceforge.net
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING
USES= gnome perl5 shebangfix ssl tar:tgz
SHEBANG_FILES= demopipeprogram.pl.sample
USE_PERL5= run
USE_GNOME= libxml2
USE_RC_SUBR= ndpmonitor
GNU_CONFIGURE= yes
CONFIGURE_ENV= OSTYPE=FreeBSD
CONFIGURE_ARGS= --with-var-datadir=${PREFIX}/var --with-confdir=${ETCDIR} \
--with-libxml2=${LOCALBASE} --cache-file=/dev/null
PORTDOCS= INSTALL README
CUSTOMMSG= ${WRKDIR}/custom-message
PKGMESSAGE= ${CUSTOMMSG}
OPTIONS_DEFINE= DOCS MACRESOLV
OPTIONS_DEFAULT=
OPTIONS_SUB= yes
MACRESOLV_DESC= Enable MAC Manufacturer Resolution
MACRESOLV_CONFIGURE_ENABLE= mac-resolv
MACRESOLV_BUILD_DEPENDS= p5-libwww>=6.05:www/p5-libwww
MACRESOLV_RUN_DEPENDS= p5-libwww>=6.05:www/p5-libwww
MACRESOLV_BROKEN= MACRESOLV option tries to fetch during build
.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/ndpmon.8 \
${WRKSRC}/create_html_table.py \
${WRKSRC}/demopipeprogram.pl.sample \
${WRKSRC}/config_ndpmon.xml.in \
${WRKSRC}/config_ndpmon.xml
(cd ${WRKSRC}; ${MAKE} clean)
${TOUCH} ${CUSTOMMSG}
.if ${PORT_OPTIONS:MMACRESOLV}
${CAT} ${.CURDIR}/pkg-message.MACRESOLV > ${CUSTOMMSG}
.endif
do-install:
${INSTALL_MAN} ${WRKSRC}/ndpmon.8 ${STAGEDIR}${PREFIX}/man/man8
${INSTALL_PROGRAM} ${WRKSRC}/ndpmon ${STAGEDIR}${PREFIX}/sbin
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/*.dtd ${STAGEDIR}${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/demopipeprogram.pl.sample ${STAGEDIR}${DATADIR}
.if ${PORT_OPTIONS:MMACRESOLV}
${MKDIR} ${STAGEDIR}${DATADIR}/plugins/mac_resolv
${INSTALL_SCRIPT} ${WRKSRC}/plugins/mac_resolv/make-manuf ${STAGEDIR}${DATADIR}/plugins/mac_resolv
${INSTALL_DATA} ${WRKSRC}/plugins/mac_resolv/*.tmpl ${STAGEDIR}${DATADIR}/plugins/mac_resolv
${INSTALL_DATA} ${WRKSRC}/plugins/mac_resolv/manuf ${STAGEDIR}${DATADIR}/plugins/mac_resolv
.endif
${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/config_ndpmon.xml ${STAGEDIR}${ETCDIR}/config_ndpmon.xml-dist
${MKDIR} ${STAGEDIR}${PREFIX}/var/ndpmon
${INSTALL_DATA} ${WRKSRC}/neighbor_list.xml ${STAGEDIR}${PREFIX}/var/ndpmon/neighbor_list.xml
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>