74 lines
2.4 KiB
Makefile
74 lines
2.4 KiB
Makefile
VICTORIAMETRICS_VERSION = 1.80.0
|
|
VICTORIAMETRICS_SITE = $(call github,VictoriaMetrics,VictoriaMetrics,v$(VICTORIAMETRICS_VERSION))
|
|
VICTORIAMETRICS_LICENSE = Apache-2.0
|
|
VICTORIAMETRICS_LICENSE_FILES = LICENSE
|
|
|
|
VICTORIAMETRICS_LDFLAGS = -extldflags '-static'
|
|
VICTORIAMETRICS_TAGS = netgo osusergo nethttpomithttp2 musl
|
|
VICTORIAMETRICS_INSTALL_BINS =
|
|
|
|
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_SINGLE),y)
|
|
VICTORIAMETRICS_BUILD_CMDS = $(MAKE) victoria-metrics
|
|
VICTORIAMETRICS_INSTALL_BINS += victoria-metrics
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAGENT),y)
|
|
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmagent
|
|
VICTORIAMETRICS_INSTALL_BINS += vmagent
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMALERT),y)
|
|
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmalert
|
|
VICTORIAMETRICS_INSTALL_BINS += vmalert
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAUTH),y)
|
|
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmauth
|
|
VICTORIAMETRICS_INSTALL_BINS += vmauth
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMBACKUP),y)
|
|
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmbackup
|
|
VICTORIAMETRICS_INSTALL_BINS += vmbackup
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMRESTORE),y)
|
|
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmrestore
|
|
VICTORIAMETRICS_INSTALL_BINS += vmrestore
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMCTL),y)
|
|
VICTORIAMETRICS_BUILD_CMDS += $(MAKE) vmctl
|
|
VICTORIAMETRICS_INSTALL_BINS += vmctl
|
|
endif
|
|
|
|
define VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_SINGLE
|
|
$(INSTALL) -D -m u=rw,go=r \
|
|
$(BR2_EXTERNAL_metricspi_PATH)/package/victoriametrics/victoria-metrics.service \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/victoria-metrics.service
|
|
endef
|
|
|
|
define VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_VMAGENT
|
|
$(INSTALL) -D -m u=rw,go=r \
|
|
$(BR2_EXTERNAL_metricspi_PATH)/package/victoriametrics/vmagent.service \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/vmagent.service
|
|
endef
|
|
|
|
define VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_VMALERT
|
|
$(INSTALL) -D -m u=rw,go=r \
|
|
$(BR2_EXTERNAL_metricspi_PATH)/package/victoriametrics/vmalert.service \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/vmalert.service
|
|
endef
|
|
|
|
define VICTORIAMETRICS_INSTALL_INIT_SYSTEMD
|
|
$(if $(BR2_PACKAGE_VICTORIAMETRICS_SINGLE),$(VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_SINGLE))
|
|
$(if $(BR2_PACKAGE_VICTORIAMETRICS_VMAGENT),$(VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_VMAGENT))
|
|
$(if $(BR2_PACKAGE_VICTORIAMETRICS_VMALERT),$(VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_VMALERT))
|
|
endef
|
|
|
|
define VICTORIAMETRICS_USERS
|
|
victoriametrics -1 victoriametrics -1 * /var/lib/victoria-metrics /sbin/nologin -
|
|
endef
|
|
|
|
$(eval $(generic-package))
|