1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

net-mgmt/percona-monitoring-plugins: Improve FreeBSD compatibility

- Properly declare wget as a dependency
- Give full path to wget binary
- Scripts that can take config files should source from LOCALBASE/etc,
not /etc

PR:		218611
Approved by:	maintainer timeout
This commit is contained in:
Mark Felder 2017-04-25 16:07:32 +00:00
parent 063e4d757c
commit 92a95e2cd6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=439404

View File

@ -3,7 +3,7 @@
PORTNAME= percona-monitoring-plugins
PORTVERSION= 1.1.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net-mgmt
MASTER_SITES= http://www.percona.com/downloads/percona-monitoring-plugins/${PORTVERSION}/ \
ftp://ftp.renatasystems.org/pub/FreeBSD/ports/distfiles/
@ -20,7 +20,8 @@ RUN_DEPENDS= cacti>=0:net-mgmt/cacti \
p5-Digest-MD5>=0:security/p5-Digest-MD5 \
p5-Getopt-Long>=0:devel/p5-Getopt-Long \
p5-Time-HiRes>=0:devel/p5-Time-HiRes \
bash:shells/bash
bash:shells/bash \
wget:ftp/wget
USES= shebangfix perl5 php:cli
USE_PERL5= run
@ -36,6 +37,12 @@ CACTIDIR?= share/cacti
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} 's|/etc/cacti/|${LOCALBASE}/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|${LOCALBASE}/etc/nagios/mysql.cnf|g' ${WRKSRC}/nagios/bin/pmp-check-mysql-*
@${REINPLACE_CMD} 's|/etc/cacti/|${LOCALBASE}/etc/cacti/|g' ${WRKSRC}/zabbix/scripts/ss_get_mysql_stats.php
@${REINPLACE_CMD} 's|wget|${LOCALBASE}/bin/wget|g' ${WRKSRC}/cacti/scripts/ss_get_by_ssh.php
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/share/cacti/scripts
${MKDIR} ${STAGEDIR}${PREFIX}/share/percona-monitoring-plugins