| @@ -1,67 +1,67 @@ | | | @@ -1,67 +1,67 @@ |
1 | # $NetBSD: Makefile,v 1.38 2020/11/13 19:26:04 bsiegert Exp $ | | 1 | # $NetBSD: Makefile,v 1.39 2020/11/17 08:47:52 adam Exp $ |
2 | | | 2 | |
3 | DISTNAME= prometheus-2.22.1 | | 3 | DISTNAME= prometheus-2.22.2 |
4 | MASTER_SITES= ${MASTER_SITE_GITHUB:=prometheus/} | | 4 | MASTER_SITES= ${MASTER_SITE_GITHUB:=prometheus/} |
5 | PKGREVISION= 1 | | 5 | PKGREVISION= 1 |
6 | CATEGORIES= databases | | 6 | CATEGORIES= databases |
7 | GITHUB_TAG= v${PKGVERSION_NOREV} | | 7 | GITHUB_TAG= v${PKGVERSION_NOREV} |
8 | | | 8 | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | 9 | MAINTAINER= pkgsrc-users@NetBSD.org |
10 | HOMEPAGE= https://prometheus.io/ | | 10 | HOMEPAGE= https://prometheus.io/ |
11 | COMMENT= The Prometheus monitoring system and time series database | | 11 | COMMENT= The Prometheus monitoring system and time series database |
12 | LICENSE= apache-2.0 | | 12 | LICENSE= apache-2.0 |
13 | | | 13 | |
14 | GO_DIST_BASE= ${DISTNAME} | | 14 | GO_DIST_BASE= ${DISTNAME} |
15 | GO_SRCPATH= github.com/prometheus/prometheus | | 15 | GO_SRCPATH= github.com/prometheus/prometheus |
16 | | | 16 | |
17 | PKG_SYSCONFSUBDIR= prometheus | | 17 | PKG_SYSCONFSUBDIR= prometheus |
18 | | | 18 | |
19 | USE_TOOLS+= pax | | 19 | USE_TOOLS+= pax |
20 | BUILD_DEFS+= VARBASE PKG_SYSCONFDIR | | 20 | BUILD_DEFS+= VARBASE PKG_SYSCONFDIR |
21 | | | 21 | |
22 | SUBST_CLASSES+= paths | | 22 | SUBST_CLASSES+= paths |
23 | SUBST_FILES.paths+= cmd/prometheus/main.go | | 23 | SUBST_FILES.paths+= cmd/prometheus/main.go |
24 | SUBST_STAGE.paths= post-configure | | 24 | SUBST_STAGE.paths= post-configure |
25 | SUBST_VARS.paths= PKG_SYSCONFDIR VARBASE | | 25 | SUBST_VARS.paths= PKG_SYSCONFDIR VARBASE |
26 | | | 26 | |
27 | SUBST_CLASSES+= webui | | 27 | SUBST_CLASSES+= webui |
28 | SUBST_FILES.webui= web/ui/ui.go | | 28 | SUBST_FILES.webui= web/ui/ui.go |
29 | SUBST_STAGE.webui= post-configure | | 29 | SUBST_STAGE.webui= post-configure |
30 | SUBST_VARS.webui= WEBUI_DIR | | 30 | SUBST_VARS.webui= WEBUI_DIR |
31 | | | 31 | |
32 | MAKE_DIRS+= ${PKG_SYSCONFDIR}/consoles ${PKG_SYSCONFDIR}/console_libraries | | 32 | MAKE_DIRS+= ${PKG_SYSCONFDIR}/consoles ${PKG_SYSCONFDIR}/console_libraries |
33 | EXAMPLE_DIR= share/examples/prometheus | | 33 | EXAMPLE_DIR= share/examples/prometheus |
34 | EXAMPLE_FILES= prometheus.yml | | 34 | EXAMPLE_FILES= prometheus.yml |
35 | EXAMPLE_FILES+= consoles/index.html.example consoles/node-cpu.html \ | | 35 | EXAMPLE_FILES+= consoles/index.html.example consoles/node-cpu.html \ |
36 | consoles/node-disk.html consoles/node-overview.html \ | | 36 | consoles/node-disk.html consoles/node-overview.html \ |
37 | consoles/node.html consoles/prometheus-overview.html \ | | 37 | consoles/node.html consoles/prometheus-overview.html \ |
38 | consoles/prometheus.html | | 38 | consoles/prometheus.html |
39 | EXAMPLE_FILES+= console_libraries/menu.lib console_libraries/prom.lib | | 39 | EXAMPLE_FILES+= console_libraries/menu.lib console_libraries/prom.lib |
40 | WEBUI_DIR= ${PREFIX}/share/prometheus | | 40 | WEBUI_DIR= ${PREFIX}/share/prometheus |
41 | | | 41 | |
42 | INSTALLATION_DIRS+= bin ${EXAMPLE_DIR} ${WEBUI_DIR} | | 42 | INSTALLATION_DIRS+= bin ${EXAMPLE_DIR} ${WEBUI_DIR} |
43 | | | 43 | |
44 | .for f in ${EXAMPLE_FILES} | | 44 | .for f in ${EXAMPLE_FILES} |
45 | CONF_FILES+= ${EXAMPLE_DIR}/${f} ${PKG_SYSCONFDIR}/${f} | | 45 | CONF_FILES+= ${EXAMPLE_DIR}/${f} ${PKG_SYSCONFDIR}/${f} |
46 | .endfor | | 46 | .endfor |
47 | | | 47 | |
48 | do-install: | | 48 | do-install: |
49 | ${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml \ | | 49 | ${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml \ |
50 | ${DESTDIR}${PREFIX}/${EXAMPLE_DIR} | | 50 | ${DESTDIR}${PREFIX}/${EXAMPLE_DIR} |
51 | .for f in prometheus promtool | | 51 | .for f in prometheus promtool |
52 | ${INSTALL_PROGRAM} ${WRKDIR}/bin/${f} ${DESTDIR}${PREFIX}/bin | | 52 | ${INSTALL_PROGRAM} ${WRKDIR}/bin/${f} ${DESTDIR}${PREFIX}/bin |
53 | .endfor | | 53 | .endfor |
54 | .for f in consoles console_libraries | | 54 | .for f in consoles console_libraries |
55 | cd ${WRKSRC} && ${PAX} -rw ${f} ${DESTDIR}${PREFIX}/${EXAMPLE_DIR} | | 55 | cd ${WRKSRC} && ${PAX} -rw ${f} ${DESTDIR}${PREFIX}/${EXAMPLE_DIR} |
56 | .endfor | | 56 | .endfor |
57 | .for f in static templates | | 57 | .for f in static templates |
58 | cd ${WRKSRC}/web/ui && ${PAX} -rw ${f} ${DESTDIR}${WEBUI_DIR} | | 58 | cd ${WRKSRC}/web/ui && ${PAX} -rw ${f} ${DESTDIR}${WEBUI_DIR} |
59 | .endfor | | 59 | .endfor |
60 | | | 60 | |
61 | post-install: | | 61 | post-install: |
62 | .for f in ${EXAMPLE_FILES} | | 62 | .for f in ${EXAMPLE_FILES} |
63 | ${CHMOD} ${NONBINMODE} ${DESTDIR}${PREFIX}/${EXAMPLE_DIR}/${f} | | 63 | ${CHMOD} ${NONBINMODE} ${DESTDIR}${PREFIX}/${EXAMPLE_DIR}/${f} |
64 | .endfor | | 64 | .endfor |
65 | | | 65 | |
66 | .include "../../lang/go/go-package.mk" | | 66 | .include "../../lang/go/go-package.mk" |
67 | .include "../../mk/bsd.pkg.mk" | | 67 | .include "../../mk/bsd.pkg.mk" |