ajacoutot c4096e6659 Stop using the daemon class in @newuser.
If we need to make an exception we can do it and properly document the
reason but by default we should just use the default login class.
rc.d uses daemon or the login class provided in login.conf.d so this has
no impact there.

discussed with sthen@, tb@ and robert@

praying that my grep/sed skills did not break anything and still
believing in portbump :-)
2022-11-08 11:16:56 +00:00

60 lines
1.9 KiB
Makefile

COMMENT = monitoring and metric analytics dashboards
V = 9.2.1
DISTNAME = grafana+vendor-$V
WRKDIST = ${WRKDIR}/grafana-$V
EXTRACT_SUFX = .tar.zst
PKGNAME = grafana-$V
REVISION = 0
MAINTAINER = Lucas Raab <tuftedocelot@fastmail.fm>
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
# running "gmake gen-go", "go mod tidy", and "go mod vendor"
MASTER_SITES = https://ports.lucasraab.me/
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_GO111MODULE = on
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:
mkdir -p ${WRKDIR}/go/src/github.com/grafana
ln -s ../../all ${WRKDIR}/go/src/github.com/grafana/grafana
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>