summaryrefslogtreecommitdiff
path: root/net-mgmt/py-gstat_exporter/Makefile
blob: b50b802fd4b9a633986bfc95b4b4c38cae98416c (plain)
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

PORTNAME=	gstat_exporter
PORTVERSION=	20191119
CATEGORIES=	net-mgmt python
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	lapo@lapo.it
COMMENT=	Prometheus exporter for gstat data

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

IGNORE_FreeBSD_11=	needs "gstat -C", available since FreeBSD 12.0

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}prometheus-client>=0.7.1:net-mgmt/py-prometheus-client@${PY_FLAVOR}

USES=		python:3.6+

USE_GITHUB=	yes
GH_ACCOUNT=	tykling
GH_PROJECT=	gstat_exporter
GH_TAGNAME=	3c1858a52544b2eec56f5470e4042a7171e5448a

NO_BUILD=	yes
NO_ARCH=	yes

USE_RC_SUBR=	gstat_exporter
SUB_LIST=	PYTHON_CMD=${PYTHON_CMD}

PLIST_FILES=	bin/${PORTNAME}.py

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py ${STAGEDIR}${PREFIX}/bin
	${REINPLACE_CMD} -i '' -e "1i\\${.newline}#!${PYTHON_CMD}" ${STAGEDIR}${PREFIX}/bin/${PORTNAME}.py

.include <bsd.port.mk>