Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / utils / prometheus / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=prometheus
4 PKG_VERSION:=2.21.0
5 PKG_RELEASE:=2
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:=afafed1be631a53ada60e2b2f12cfdb51dcaee5e539fb65e9983f3276c99f5af
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_USE_MIPS16:=0
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 endef
51
52 define Package/prometheus/install
53 $(call GoPackage/Package/Install/Bin,$(1))
54
55 $(CP) ./files/* $(1)/
56 endef
57
58 define Package/prometheus/conffiles
59 /etc/prometheus.yml
60 endef
61
62 $(eval $(call GoBinPackage,prometheus))
63 $(eval $(call BuildPackage,prometheus))