2012-10-01 17:01:14 +02:00
|
|
|
# Created by: Alexey V. Degtyarev <alexey@renatasystems.org>
|
2012-01-30 10:04:54 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2012-09-20 05:56:48 +02:00
|
|
|
PORTNAME= percona-monitoring-plugins
|
2018-06-06 20:25:01 +02:00
|
|
|
PORTVERSION= 1.1.8
|
|
|
|
PORTREVISION= 0
|
2012-01-30 10:04:54 +01:00
|
|
|
CATEGORIES= net-mgmt
|
2018-06-06 20:25:01 +02:00
|
|
|
MASTER_SITES= https://www.percona.com/downloads/percona-monitoring-plugins/${PORTNAME}-${PORTVERSION}/source/tarball/ \
|
2012-09-20 05:56:48 +02:00
|
|
|
ftp://ftp.renatasystems.org/pub/FreeBSD/ports/distfiles/
|
2012-01-30 10:04:54 +01:00
|
|
|
|
2018-07-19 00:20:23 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2012-09-20 05:56:48 +02:00
|
|
|
COMMENT= Cacti templates for MySQL, Apache, Memcached, and more by Percona
|
2012-01-30 10:04:54 +01:00
|
|
|
|
|
|
|
LICENSE= GPLv2
|
2015-02-27 19:30:43 +01:00
|
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
2012-01-30 10:04:54 +01:00
|
|
|
|
2016-04-01 16:16:16 +02:00
|
|
|
RUN_DEPENDS= cacti>=0:net-mgmt/cacti \
|
|
|
|
p5-DBD-mysql>=0:databases/p5-DBD-mysql \
|
2017-04-25 18:07:32 +02:00
|
|
|
bash:shells/bash \
|
|
|
|
wget:ftp/wget
|
2012-01-30 10:04:54 +01:00
|
|
|
|
2018-02-27 13:24:27 +01:00
|
|
|
USES= mysql perl5 php:cli python:run shebangfix
|
2015-02-27 19:30:43 +01:00
|
|
|
USE_PERL5= run
|
|
|
|
SHEBANG_FILES= nagios/bin/pmp-check-pt-table-checksum \
|
2018-02-27 13:24:27 +01:00
|
|
|
nagios/bin/pmp-check-aws-rds.py \
|
2015-02-27 19:30:43 +01:00
|
|
|
cacti/bin/pmp-cacti-*
|
2012-01-30 10:04:54 +01:00
|
|
|
|
|
|
|
NO_BUILD= yes
|
2015-08-28 15:39:56 +02:00
|
|
|
NO_ARCH= yes
|
2013-02-21 22:01:25 +01:00
|
|
|
PORTDOCS= Changelog
|
2012-01-30 10:04:54 +01:00
|
|
|
|
|
|
|
CACTIDIR?= share/cacti
|
|
|
|
|
2014-02-21 14:38:46 +01:00
|
|
|
OPTIONS_DEFINE= DOCS
|
2014-02-10 14:54:26 +01:00
|
|
|
|
2018-06-06 20:25:01 +02:00
|
|
|
REINPLACE_ARGS= -i ''
|
|
|
|
|
2017-04-25 18:07:32 +02:00
|
|
|
post-patch:
|
2018-06-06 20:25:01 +02:00
|
|
|
@${REINPLACE_CMD} 's|/etc/cacti/|${PREFIX}/etc/cacti/|g' ${WRKSRC}/cacti/scripts/ss_get_mysql_stats.php ${WRKSRC}/cacti/scripts/ss_get_by_ssh.php
|
|
|
|
@${REINPLACE_CMD} 's|/etc/nagios/mysql.cnf|${PREFIX}/etc/nagios/mysql.cnf|g' ${WRKSRC}/nagios/bin/pmp-check-mysql-*
|
|
|
|
@${REINPLACE_CMD} 's|/usr/bin/php|${PREFIX}/bin/php|g' ${WRKSRC}/zabbix/scripts/get_mysql_stats_wrapper.sh
|
|
|
|
@${REINPLACE_CMD} 's|wget|${PREFIX}/bin/wget|g' ${WRKSRC}/cacti/scripts/ss_get_by_ssh.php
|
2017-04-25 18:07:32 +02:00
|
|
|
|
2012-01-30 10:04:54 +01:00
|
|
|
do-install:
|
2014-05-31 10:40:52 +02:00
|
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/share/cacti/scripts
|
|
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/share/percona-monitoring-plugins
|
2018-06-06 20:25:01 +02:00
|
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nagios
|
2012-09-20 05:56:48 +02:00
|
|
|
|
2018-06-06 20:25:01 +02:00
|
|
|
.for dir in definitions misc
|
2012-09-20 05:56:48 +02:00
|
|
|
cd ${WRKSRC} && ${PAX} -r -w cacti/${dir} \
|
2014-05-31 10:40:52 +02:00
|
|
|
${STAGEDIR}${PREFIX}/share/percona-monitoring-plugins
|
2012-01-30 10:04:54 +01:00
|
|
|
.endfor
|
2012-09-20 05:56:48 +02:00
|
|
|
|
2012-01-30 10:04:54 +01:00
|
|
|
.for script in ss_get_by_ssh.php ss_get_mysql_stats.php
|
2012-09-20 05:56:48 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/cacti/scripts/${script} \
|
2014-05-31 10:40:52 +02:00
|
|
|
${STAGEDIR}${PREFIX}/share/cacti/scripts/${script}
|
2012-01-30 10:04:54 +01:00
|
|
|
.endfor
|
|
|
|
|
2014-05-31 10:40:52 +02:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/cacti/bin/* ${STAGEDIR}${PREFIX}/bin
|
2018-06-06 20:25:01 +02:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/nagios/bin/* ${STAGEDIR}${PREFIX}/libexec/nagios
|
2012-09-20 05:56:48 +02:00
|
|
|
|
2015-08-28 15:39:56 +02:00
|
|
|
do-install-DOCS-on:
|
|
|
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
.for doc in ${PORTDOCS}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}/${doc}
|
|
|
|
.endfor
|
|
|
|
|
2012-01-30 10:04:54 +01:00
|
|
|
.include <bsd.port.mk>
|