1 # SPDX-License-Identifier: GPL-2.0-or-later
3 include $(TOPDIR
)/rules.mk
9 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
10 PKG_SOURCE_URL
:=https
://codeload.github.com
/influxdata
/telegraf
/tar.gz
/v
$(PKG_VERSION
)?
11 PKG_HASH
:=05188b5f0c0dfa204dc6bd8429ebc5366b73e42c7bdd4f1a50fffa2a1e75616f
13 PKG_MAINTAINER
:=Jonathan Pagel
<jonny_tischbein@systemli.org
>
15 PKG_LICENSE_FILES
:=LICENSE
17 PKG_BUILD_DEPENDS
:=golang
/host
21 GO_PKG
:=github.com
/influxdata
/telegraf
22 GO_PKG_BUILD_PKG
:=github.com
/influxdata
/telegraf
/cmd
/telegraf
23 GO_PKG_LDFLAGS_X
:=main.version
=$(PKG_VERSION
)
25 include $(INCLUDE_DIR
)/package.mk
26 include ..
/..
/lang
/golang
/golang-package.mk
28 define Package
/telegraf
/Default
32 DEPENDS
:=$(GO_ARCH_DEPENDS
)
35 define Package
/telegraf-full
36 $(call Package
/telegraf
/Default
)
41 define Package
/telegraf
42 $(call Package
/telegraf
/Default
)
47 define Package
/telegraf
/description
/Default
48 Telegraf is a plugin-driven agent for collecting and sending metrics and events.
49 It supports various inputs
(including prometheus endpoints
) and is able to send data into InfluxDB.
52 define Package
/telegraf
/description
53 $(call Package
/telegraf
/description
/Default
)
54 (Small build. Most plugins excluded
)
57 define Package
/telegraf-full
/description
58 $(call Package
/telegraf
/description
/Default
)
59 (Full build. including
all plugins
)
62 define Package
/telegraf
/conffiles
66 Package
/telegraf-full
/conffiles
= $(Package
/telegraf
/conffiles
)
69 $(call Build
/Prepare
/Default
)
70 ifeq ($(BUILD_VARIANT
),small
)
71 $(CP
) .
/variant-
$(BUILD_VARIANT
)/* $(PKG_BUILD_DIR
)/
75 define Package
/telegraf
/install
76 $(call GoPackage
/Package
/Install
/Bin
,$(1))
77 $(INSTALL_DIR
) $(1)/etc
/init.d
$(1)/etc
/config
78 $(INSTALL_BIN
) .
/files
/etc
/init.d
/telegraf
$(1)/etc
/init.d
/telegraf
79 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/etc
/telegraf.conf
$(1)/etc
/telegraf.conf
82 define Package
/telegraf-full
/install
83 $(call Package
/telegraf
/install,$(1))
86 $(eval
$(call GoBinPackage
,telegraf
))
87 $(eval
$(call BuildPackage
,telegraf
))
89 $(eval
$(call GoBinPackage
,telegraf-full
))
90 $(eval
$(call BuildPackage
,telegraf-full
))