summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@gentoo.org>2024-01-05 11:34:57 +0100
committerPetr Vaněk <arkamar@gentoo.org>2024-01-05 11:53:31 +0100
commit20498248615c62dd5c378526bf52e9785055226c (patch)
tree3f07a4b2f9eb68ed4ba552b0271c746b4082138d /net-analyzer/netdata-go-plugin
parentmedia-sound/abcmidi: bump to 2024.01.04, dropped 2023.12.28 (diff)
downloadgentoo-20498248615c62dd5c378526bf52e9785055226c.tar.gz
gentoo-20498248615c62dd5c378526bf52e9785055226c.tar.bz2
gentoo-20498248615c62dd5c378526bf52e9785055226c.zip
net-analyzer/netdata-go-plugin: new package, add 0.58.0
Closes: https://bugs.gentoo.org/773112 Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'net-analyzer/netdata-go-plugin')
-rw-r--r--net-analyzer/netdata-go-plugin/Manifest2
-rw-r--r--net-analyzer/netdata-go-plugin/metadata.xml11
-rw-r--r--net-analyzer/netdata-go-plugin/netdata-go-plugin-0.58.0.ebuild51
3 files changed, 64 insertions, 0 deletions
diff --git a/net-analyzer/netdata-go-plugin/Manifest b/net-analyzer/netdata-go-plugin/Manifest
new file mode 100644
index 000000000000..a1f787ab71ce
--- /dev/null
+++ b/net-analyzer/netdata-go-plugin/Manifest
@@ -0,0 +1,2 @@
+DIST go.d.plugin-0.58.0-vendor.tar.gz 11168253 BLAKE2B ac2a612a77410e1495700c99808a24a4a65aa0889c95258f74a64aabf38f3f16f3f719f4a3e5122026245bcf9ccc928298430c7e6d428def9c2bdd5b31717e30 SHA512 81520995e8417f0cb160dc740d9012eb19896786c702b86385525a07ebe84f3cff412c9fb40461fa7223bb2ab408f578362bf9f50623e4fea5219c93b0933d49
+DIST go.d.plugin-0.58.0.tar.gz 1600927 BLAKE2B e0fc2b4dd2652114c428cdeba3ab3a2c62094520ef35c7aa29ef3fa5e3c579e19fcea52e6b0a906872671679bbf84a9238f89af9b0d2c7e214c1495c9609903c SHA512 cab04ea45008b668a6103a6d147e4f96e55a132f13e5ca3054b5ea6cff263dba048a9f7f52f4781495425f9a9cbb9e43786047188b0165ca1071c7c216486e12
diff --git a/net-analyzer/netdata-go-plugin/metadata.xml b/net-analyzer/netdata-go-plugin/metadata.xml
new file mode 100644
index 000000000000..282de65d53a2
--- /dev/null
+++ b/net-analyzer/netdata-go-plugin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>arkamar@gentoo.org</email>
+ <name>Petr Vaněk</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">netdata/go.d.plugin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/netdata-go-plugin/netdata-go-plugin-0.58.0.ebuild b/net-analyzer/netdata-go-plugin/netdata-go-plugin-0.58.0.ebuild
new file mode 100644
index 000000000000..70f99d0fda15
--- /dev/null
+++ b/net-analyzer/netdata-go-plugin/netdata-go-plugin-0.58.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fcaps go-module
+
+MY_PN=go.d.plugin
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="Netdata plugin for collectors written in Go"
+HOMEPAGE="https://github.com/netdata/go.d.plugin"
+SRC_URI="
+ https://github.com/netdata/go.d.plugin/archive/refs/tags/v${PV}.tar.gz
+ -> ${MY_P}.tar.gz
+ https://github.com/netdata/go.d.plugin/releases/download/v${PV}/${MY_PN}-vendor-v${PV}.tar.gz
+ -> ${MY_P}-vendor.tar.gz
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-3+"
+# Dependent modules licenses
+LICENSE+="
+ Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0
+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="net-analyzer/netdata"
+BDEPEND=">=dev-lang/go-1.21"
+
+FILECAPS=(
+ cap_net_raw /usr/libexec/netdata/plugins.d/go.d.plugin
+)
+
+src_compile() {
+ LDFLAGS="-w -s -X main.version=${PV}-gentoo"
+ ego build -ldflags "${LDFLAGS}" "github.com/netdata/go.d.plugin/cmd/godplugin"
+}
+
+src_test() {
+ ego test ./... -cover -covermode=atomic
+}
+
+src_install() {
+ einstalldocs
+
+ exeinto "/usr/libexec/netdata/plugins.d"
+ newexe godplugin go.d.plugin
+ insinto "/usr/$(get_libdir)/netdata/conf.d"
+ doins -r config/*
+}