aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nagios-openldap-plugins/Makefile
blob: 8261af1f1f454d41fe8c12256dbb071043f4e4d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# New ports collection makefile for:    nagios-openldap-plugins
# Date created:             26 Feb 2012
# Whom:                 Ryan Steinmetz <zi@FreeBSD.org>
#
# $FreeBSD$

PORTNAME=   openldap-plugins
PORTVERSION=    0.3
CATEGORIES= net-mgmt
MASTER_SITES=   http://tools.ltb-project.org/attachments/download/152/ \
        http://mirrors.rit.edu/zi/
PKGNAMEPREFIX=  nagios-
DISTNAME=   ltb-project-nagios-plugins-${PORTVERSION}

MAINTAINER= zi@FreeBSD.org
COMMENT=    Nagios Plugins to monitor OpenLDAP

LICENSE=    GPLv2

RUN_DEPENDS=    ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap \
        p5-Date-Manip>=6.30:${PORTSDIR}/devel/p5-Date-Manip \
        ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes

PORTSCOUT=  ignore:1

NO_BUILD=   yes
USE_PERL5_RUN=  yes

PLIST_FILES=    libexec/nagios/check_ldap_dn.pl \
        libexec/nagios/check_ldap_query.pl \
        libexec/nagios/check_ldap_slurpd_status.pl \
        libexec/nagios/check_ldap_syncrepl_status.pl \
        libexec/nagios/check_ldap_time.pl \
        libexec/nagios/restart_slapd.sh
PLIST_DIRSTRY=  libexec/nagios

WRKSRC=     ${WRKDIR}/${DISTNAME}

post-patch:
    @${REINPLACE_CMD} -e 's|/etc/init.d/|${LOCALBASE}/etc/rc.d/|g' \
        -e 's|/var/run/slapd|/var/run/openldap|g' \
        ${WRKSRC}/restart_slapd.sh
    @${REINPLACE_CMD} -e 's|/usr/local/nagios/libexec|${PREFIX}/libexec/nagios|g' \
        ${WRKSRC}/*.pl

do-install:
    @${MKDIR} ${PREFIX}/libexec/nagios
    ${INSTALL_SCRIPT} ${WRKSRC}/check_ldap_dn.pl ${PREFIX}/libexec/nagios/
    ${INSTALL_SCRIPT} ${WRKSRC}/check_ldap_query.pl ${PREFIX}/libexec/nagios/
    ${INSTALL_SCRIPT} ${WRKSRC}/check_ldap_slurpd_status.pl ${PREFIX}/libexec/nagios/
    ${INSTALL_SCRIPT} ${WRKSRC}/check_ldap_syncrepl_status.pl ${PREFIX}/libexec/nagios/
    ${INSTALL_SCRIPT} ${WRKSRC}/check_ldap_time.pl ${PREFIX}/libexec/nagios/
    ${INSTALL_SCRIPT} ${WRKSRC}/restart_slapd.sh ${PREFIX}/libexec/nagios/

.include <bsd.port.mk>