Fixes CVE-2021-39226, see https://grafana.com/blog/2021/10/05/grafana-7.5.11-and-8.1.6-released-with-critical-security-fix/ also see https://grafana.com/docs/grafana/latest/whatsnew/whats-new-in-v7-5/ for changes since 7.4. A brave soul should update this monster to 8.2..
57 lines
1.8 KiB
Makefile
57 lines
1.8 KiB
Makefile
# $OpenBSD: Makefile,v 1.20 2021/10/12 14:22:16 landry Exp $
|
|
|
|
COMMENT = monitoring and metric analytics dashboards
|
|
|
|
V = 7.5.11
|
|
DISTNAME = grafana+vendor-$V
|
|
WRKDIST = ${WRKDIR}/grafana-$V
|
|
EXTRACT_SUFX = .tar.zstd
|
|
PKGNAME = grafana-$V
|
|
BUILD_ID = 0cd8deb042c68e8113e4
|
|
|
|
CATEGORIES = sysutils
|
|
|
|
HOMEPAGE = https://grafana.com
|
|
|
|
DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \
|
|
grafana-$V.linux-amd64.tar.gz{grafana-$V.linux-amd64.tar.gz?1}:0
|
|
# force CDN refresh; upstream rerolled but some CDN nodes have the old version
|
|
# normally grafana-$V.linux-amd64.tar.gz:0
|
|
|
|
# grafana+vendor distfile generated by fetching archive from
|
|
# https://github.com/grafana/grafana/archive/v$V/grafana-$V.tar.gz
|
|
# and running "go mod tidy" + "go mod vendor"
|
|
MASTER_SITES = https://rhaalovely.net/~landry/stuff/
|
|
MASTER_SITES0 = https://dl.grafana.com/oss/release/
|
|
|
|
# Apache 2.0 (bundles roboto and opensans fonts)
|
|
PERMIT_PACKAGE = Yes
|
|
|
|
MODULES = lang/go
|
|
WANTLIB += c pthread
|
|
SUBST_VARS += BUILD_ID
|
|
|
|
MODGO_FLAGS += -ldflags="-w -X main.version=$V"
|
|
|
|
# remove linux binaries from grafana-$V.linux-amd64.tar.gz
|
|
post-extract:
|
|
rm ${WRKDIST}/bin/*
|
|
|
|
do-build:
|
|
cd ${WRKSRC} && ${MODGO_CMD} run ${MODGO_FLAGS} build.go setup
|
|
cd ${WRKSRC} && ${MODGO_CMD} run ${MODGO_FLAGS} build.go build
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/openbsd-*/grafana-{server,cli} ${PREFIX}/bin
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/grafana
|
|
${SUBST_CMD} ${WRKSRC}/conf/sample.ini
|
|
.for c in sample.ini ldap.toml
|
|
${INSTALL_DATA} ${WRKSRC}/conf/$c ${PREFIX}/share/examples/grafana
|
|
.endfor
|
|
cd ${WRKSRC}/conf/ && pax -rw provisioning ${PREFIX}/share/examples/grafana/
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/grafana/conf
|
|
${INSTALL_DATA} ${WRKSRC}/conf/defaults.ini ${PREFIX}/share/grafana/conf/
|
|
cp -R ${WRKSRC}/public ${PREFIX}/share/grafana
|
|
|
|
.include <bsd.port.mk>
|