1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

- Convert VictoriaMetrics ports to master-slave relationship which

allows to remove lots of duplicated lines between the Makefiles
- Remove not actually needed, albeit harmless patch while I'm here
This commit is contained in:
Alexey Dokuchaev 2021-04-16 10:29:26 +00:00
parent f1ea4a0bfd
commit 8537097a72
4 changed files with 17 additions and 57 deletions

View File

@ -1,18 +1,18 @@
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
PORTNAME= victoria-metrics
PORTNAME?= victoria-metrics
DISTVERSIONPREFIX= v
DISTVERSION= 1.58.0
CATEGORIES= net-mgmt
MAINTAINER= danfe@FreeBSD.org
COMMENT= Fast, cost-effective, and scalable time series database
COMMENT?= Fast, cost-effective, and scalable time series database
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= gmake go:modules,no_targets
USE_RC_SUBR= ${PORTNAME}
USE_RC_SUBR?= ${PORTNAME}
MAKE_ENV= PKG_TAG=${DISTVERSIONPREFIX}${DISTVERSION} \
BUILDINFO_TAG=edd1590 GOOS=${OPSYS:tl}
ALL_TARGET= ${PORTNAME}-pure
@ -21,11 +21,9 @@ USE_GITHUB= yes
GH_ACCOUNT= VictoriaMetrics
GH_PROJECT= VictoriaMetrics
.include "${.CURDIR}/Makefile.deps"
USERS= ${PORTNAME}
GROUPS= ${PORTNAME}
VICTORIA_DATA?= /var/db/${PORTNAME}
USERS= victoria-metrics
GROUPS= victoria-metrics
VICTORIA_DATA?= /var/db/victoria-metrics
SUB_LIST+= VICTORIA_DATA=${VICTORIA_DATA} \
VICTORIA_USER=${USERS}
@ -36,14 +34,20 @@ PLIST_SUB+= VICTORIA_DATA=${VICTORIA_DATA} \
OPTIONS_DEFINE= DOCS
.if !target(do-install)
do-install:
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/bin/${PORTNAME}-pure \
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
@${MKDIR} ${STAGEDIR}${VICTORIA_DATA}
.endif
.if !target(do-install-DOCS-on)
do-install-DOCS-on:
@cd ${INSTALL_WRKSRC}/docs && ${RM} robots.txt vm*
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${INSTALL_WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>
.include "${MASTERDIR}/Makefile.deps"

View File

@ -1,17 +0,0 @@
--- Makefile.orig 2021-04-08 06:35:50 UTC
+++ Makefile
@@ -1,5 +1,6 @@
PKG_PREFIX := github.com/VictoriaMetrics/VictoriaMetrics
+ifneq (,$(wildcard .git))
BUILDINFO_TAG ?= $(shell echo $$(git describe --long --all | tr '/' '-')$$( \
git diff-index --quiet HEAD -- || echo '-dirty-'$$(git diff-index -u HEAD | openssl sha1 | cut -c 10-17)))
@@ -7,6 +8,7 @@ PKG_TAG ?= $(shell git tag -l --points-at HEAD)
ifeq ($(PKG_TAG),)
PKG_TAG := $(BUILDINFO_TAG)
endif
+endif
GO_BUILDINFO = -X '$(PKG_PREFIX)/lib/buildinfo.Version=$(APP_NAME)-$(shell date -u +'%Y%m%d-%H%M%S')-$(BUILDINFO_TAG)'

View File

@ -1,41 +1,12 @@
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
PORTNAME= vmutils
DISTVERSIONPREFIX= v
DISTVERSION= 1.58.0
CATEGORIES= net-mgmt
DISTINFO_FILE= ${.CURDIR}/../victoria-metrics/distinfo
MAINTAINER= danfe@FreeBSD.org
COMMENT= Ancillary utilities and agent for VictoriaMetrics
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= gmake go:modules,no_targets
USE_RC_SUBR= vmagent
MAKE_ENV= PKG_TAG=${DISTVERSIONPREFIX}${DISTVERSION} \
BUILDINFO_TAG=edd1590 GOOS=${OPSYS:tl}
ALL_TARGET= ${PORTNAME}-pure
USE_GITHUB= yes
GH_ACCOUNT= VictoriaMetrics
GH_PROJECT= VictoriaMetrics
.include "${.CURDIR}/../victoria-metrics/Makefile.deps"
USERS= victoria-metrics
GROUPS= victoria-metrics
VICTORIA_DATA?= /var/db/victoria-metrics
SUB_LIST+= VICTORIA_DATA=${VICTORIA_DATA} \
VICTORIA_USER=${USERS}
PLIST_SUB+= VICTORIA_DATA=${VICTORIA_DATA} \
VICTORIA_GROUP=${GROUPS} \
VICTORIA_USER=${USERS}
OPTIONS_DEFINE= DOCS
DESCR= ${.CURDIR}/pkg-descr
PLIST= ${.CURDIR}/pkg-plist
do-install:
.for p in agent alert auth backup ctl restore
@ -47,4 +18,6 @@ do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${INSTALL_WRKSRC}/docs/vm* ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
MASTERDIR= ${.CURDIR}/../victoria-metrics
.include "${MASTERDIR}/Makefile"