aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/py-pdagent-integrations/Makefile
blob: 3118221a6098b936ae4066fffa8b892340b71e20 (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
PORTNAME=	pdagent-integrations
PORTVERSION=	1.6.2
DISTVERSIONPREFIX=v
CATEGORIES=	net-mgmt python
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	dvl@FreeBSD.org
COMMENT=	PagerDuty integrations for monitoring monitoring tools
WWW=		https://github.com/PagerDuty/pdagent-integrations

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE.TXT

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

USES=		python:3.7+ shebangfix

USE_GITHUB=	yes
GH_ACCOUNT=	PagerDuty

SHEBANG_FILES=	bin/*

SUB_FILES=	pagerduty-icinga2.conf pkg-message

NO_ARCH=	yes
NO_BUILD=	yes
PORTDOCS=	*-testing.txt
EXAMPLES=	conf.d/sensu_pagerduty_handler.json \
		pagerduty_nagios.cfg

OPTIONS_DEFINE=	DOCS EXAMPLES

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:
	(cd ${WRKSRC}/bin ; ${INSTALL_SCRIPT} * ${STAGEDIR}${PREFIX}/bin)

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

do-install-EXAMPLES-on:
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	${INSTALL_DATA} ${EXAMPLES:S|^|${WRKSRC}/|} ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>