treewide: refactor to use PKG_BUILD_FLAGS:=no-mips16
[feed/packages.git] / utils / prometheus / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=prometheus
4 PKG_VERSION:=2.25.2
5 PKG_RELEASE:=$(AUTORELEASE)
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_URL:=https://codeload.github.com/prometheus/prometheus/tar.gz/v${PKG_VERSION}?
9 PKG_HASH:=85f50c0cfb4db206a59d2c3301e02d685c3fe4b451b41ca943a4eb94935cf4d4
10
11 PKG_LICENSE:=Apache-2.0
12 PKG_LICENSE_FILES:=LICENSE
13 PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
14
15 PKG_BUILD_DEPENDS:=golang/host
16 PKG_BUILD_PARALLEL:=1
17 PKG_BUILD_FLAGS:=no-mips16
18
19 GO_PKG:=github.com/prometheus/prometheus/
20 GO_PKG_BUILD_PKG:=github.com/prometheus/prometheus/cmd/prometheus/
21
22 GO_PKG_LDFLAGS_X:=\
23 github.com/prometheus/common/version.Version=v$(PKG_VERSION) \
24 github.com/prometheus/common/version.Revision=$(PKG_VERSION) \
25 github.com/prometheus/common/version.Branch="release" \
26 github.com/prometheus/common/version.BuildUser=openwrt \
27 github.com/prometheus/common/version.BuildDate=$(SOURCE_DATE_EPOCH)
28
29 include $(INCLUDE_DIR)/package.mk
30 include ../../lang/golang/golang-package.mk
31
32 define Package/prometheus/Default
33 TITLE:=Monitoring system & time series database
34 USERID:=prometheus=112:prometheus=112
35 URL:=http://prometheus.io
36 DEPENDS:=$(GO_ARCH_DEPENDS)
37 endef
38
39 define Package/prometheus
40 $(call Package/prometheus/Default)
41 SECTION:=utils
42 CATEGORY:=Utilities
43 endef
44
45 define Package/prometheus/description
46 Prometheus, a Cloud Native Computing Foundation project, is a systems and
47 service monitoring system. It collects metrics from configured targets at given
48 intervals, evaluates rule expressions, displays the results, and can trigger
49 alerts if some condition is observed to be true.
50
51 Default tsdb path is /srv/prometheus, you might want to edit /etc/config/prometheus
52 in order to place it on USB storage or external SD card.
53 endef
54
55 define Package/prometheus/install
56 $(call GoPackage/Package/Install/Bin,$(1))
57
58 $(CP) ./files/* $(1)/
59 endef
60
61 define Package/prometheus/conffiles
62 /etc/prometheus.yml
63 endef
64
65 $(eval $(call GoBinPackage,prometheus))
66 $(eval $(call BuildPackage,prometheus))