You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.0 KiB

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