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

122 lines
3.8 KiB
Makefile

PORTNAME= pandora_server
PORTREVISION= 1
CATEGORIES= net-mgmt
MAINTAINER= koichiro@rworks.jp
COMMENT= Pandora FMS server
WWW= http://www.pandorafms.org/
LICENSE= ${PANDORA_LICENSE}
LICENSE_FILE= ${PANDORA_LICENSE_FILE}
PANDORA_DEPS= p5-DBI>=0:databases/p5-DBI \
p5-HTML-Parser>=0:www/p5-HTML-Parser \
p5-IO-Socket-INET6>=0:net/p5-IO-Socket-INET6 \
p5-NetAddr-IP>=0:net-mgmt/p5-NetAddr-IP \
net-snmp>=0:net-mgmt/net-snmp \
p5-Socket6>=0:net/p5-Socket6 \
p5-XML-Simple>=0:textproc/p5-XML-Simple \
p5-XML-Twig>=0:textproc/p5-XML-Twig \
p5-JSON>=0:converters/p5-JSON
BUILD_DEPENDS= ${PANDORA_DEPS}
RUN_DEPENDS= p5-libwww>=0:www/p5-libwww \
p5-DBD-mysql>=4:databases/p5-DBD-mysql \
wmic:net-mgmt/wmi-client \
nmap:security/nmap \
p5-Encode-Locale>=0:converters/p5-Encode-Locale \
${PANDORA_DEPS}
OPTIONS_DEFINE= DOCS TENTACLE XPROBE PGSQL EXTRAS
OPTIONS_DEFAULT= TENTACLE XPROBE EXTRAS
DOCS_DESC= Install AUTHORS, ChangeLog and README
TENTACLE_DESC= Install tentacle_server
XPROBE_DESC= Install xprobe
PGSQL_DESC= Use PostgreSQL backend (experimental)
EXTRAS_DESC= Extra dependencies for util scripts
USES= perl5 shebangfix
SHEBANG_FILES= FreeBSD/pandora_server \
bin/pandora_server \
util/integrity_check \
util/pandora_backup.sh \
util/pandora_count.sh \
util/pandora_diagnostic.sh \
util/pandora_remote_agent.sh \
util/pandora_server \
util/pandora_watchdog.sh \
util/plugin/babel_plugin/babel_plugin.sh \
util/plugin/create_integria_incident.sh \
util/plugin/dns_plugin.sh \
util/plugin/integria_plugin/integria_plugin.sh \
util/plugin/mysql_plugin.sh \
util/plugin/packet_loss.sh \
util/plugin/ssh_pandoraplugin.sh \
util/plugin/udp_nmap_plugin.sh \
util/plugin/webcheck_plugin.sh \
util/snmptrap_gen.sh \
util/tentacle_serverd \
util/trap_rate.sh
USE_PERL5= build run
SUB_LIST+= PERL="${PERL}" DATADIR="${DATADIR}"
SUB_FILES= pkg-message
.include "${.CURDIR}/bsd.pandora.mk"
PORTDOCS+= README
PANDORA_INSTALLER_ARGS+= --destdir ${STAGEDIR}
.include <bsd.port.pre.mk>
.if ! ${PORT_OPTIONS:MTENTACLE}
PLIST_SUB+= TENTACLE="@comment "
PANDORA_INSTALLER_ARGS+=--no-tentacle
.else
PLIST_SUB+= TENTACLE=""
#USE_RC_SUBR+= tentacle_server
.endif
.if ${PORT_OPTIONS:MXPROBE}
RUN_DEPENDS+= ${LOCALBASE}/bin/xprobe2:net/xprobe
.endif
.if ${PORT_OPTIONS:MPGSQL}
RUN_DEPENDS+= p5-DBD-Pg>=0:databases/p5-DBD-Pg
.endif
.if ${PORT_OPTIONS:MEXTRAS}
# plugin/bgp_pluin.pl
RUN_DEPENDS+= p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP
# plugin/multicast.pl
RUN_DEPENDS+= p5-IO-Socket-Multicast>=0:net/p5-IO-Socket-Multicast
# plugin/openvpn_pandoraplugin.pl
RUN_DEPENDS+= p5-Net-Telnet>=0:net/p5-Net-Telnet
# plugin/integria_plugin/integria_plugin.sh, plugin/webcheck_plugin.sh,
# plugin/babel_plugin/babel_plugin.sh, plugin/create_integria_incident.sh
RUN_DEPENDS+= ${LOCALBASE}/bin/wget:ftp/wget
# plugin/ipmi-plugin.pl, recon_scripts/ipmi-recon.pl
RUN_DEPENDS+= ${LOCALBASE}/sbin/ipmi-sensors:sysutils/freeipmi
.endif
post-patch:
@${REINPLACE_CMD} \
-e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%DATADIR%%|${DATADIR}|g' \
-e 's|%%MAN1PREFIX%%|${MAN1PREFIX}|g' \
-e 's|%%PANDORA_ETCDIR%%|${PANDORA_ETCDIR}|g' \
-e 's|%%PANDORA_LOGDIR%%|${PANDORA_LOGDIR}|g' \
-e 's|%%PANDORA_SPOOLDIR%%|${PANDORA_SPOOLDIR}|g' \
${WRKSRC}/pandora_server_installer
@${REINPLACE_CMD} -i "" \
-e 's,/usr/bin/perl,${PERL},g' \
`${GREP} -rl /usr/bin/perl ${WRKSRC} | ${GREP} -v pandora_server_installer`
post-install:
@${FIND} ${STAGEDIR}${DATADIR} -type l -name PandoraFMS -delete
.for x in pandora_server tentacle_server
@cd ${STAGEDIR}${PREFIX}/etc/rc.d && test -f ${x} \
&& ${REINPLACE_CMD} -i "" -e 's|/usr/local|${PREFIX}|g' ${x}
.endfor
@${MV} ${STAGEDIR}${ETCDIR}/pandora_server.conf ${STAGEDIR}${ETCDIR}/pandora_server.conf.sample
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for x in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${x} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.post.mk>