aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/pdagent-integrations/Makefile
blob: 2b0fd8ef32774504b51face951aaab11d47dae12 (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
# Created by: Mark Felder <feld@FreeBSD.org>
# $FreeBSD$

PORTNAME=   pdagent-integrations
PORTVERSION=    1.4
DISTVERSIONPREFIX=v
CATEGORIES= net-mgmt python

MAINTAINER= feld@FreeBSD.org
COMMENT=    PagerDuty integrations for monitoring monitoring tools

LICENSE=    BSD3CLAUSE

RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}pdagent>0:net-mgmt/py-pdagent

USES=   python:2.7 shebangfix

USE_GITHUB= yes
GH_ACCOUNT= PagerDuty

SHEBANG_FILES=  bin/*

SUB_FILES=  pagerduty-icinga2.conf pkg-message

NO_ARCH=    yes
NO_BUILD=   yes

post-patch:
    ${REINPLACE_CMD} 's|/usr/share/pdagent-integrations/bin|${PREFIX}/bin|g' ${WRKSRC}/pagerduty_nagios.cfg ${WRKSRC}/conf.d/sensu_pagerduty_handler.json

do-install:
    ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/bin/pd-nagios ${STAGEDIR}${LOCALBASE}/bin
    ${INSTALL_SCRIPT} ${WRKSRC}/bin/pd-sensu ${STAGEDIR}${LOCALBASE}/bin
    ${INSTALL_SCRIPT} ${WRKSRC}/bin/pd-zabbix ${STAGEDIR}${LOCALBASE}/bin
    ${INSTALL_DATA} ${WRKSRC}/conf.d/sensu_pagerduty_handler.json ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/pagerduty_nagios.cfg ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKDIR}/pagerduty-icinga2.conf ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>