summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-metrics')
-rw-r--r--app-metrics/nginx-vts-exporter/Manifest1
-rw-r--r--app-metrics/nginx-vts-exporter/nginx-vts-exporter-0.10.3.ebuild47
2 files changed, 48 insertions, 0 deletions
diff --git a/app-metrics/nginx-vts-exporter/Manifest b/app-metrics/nginx-vts-exporter/Manifest
index e6c23304897f..a14f1b9f258b 100644
--- a/app-metrics/nginx-vts-exporter/Manifest
+++ b/app-metrics/nginx-vts-exporter/Manifest
@@ -1 +1,2 @@
DIST nginx-vts-exporter-0.10.0.tar.gz 149620 BLAKE2B 6856240886d1a7082c901535954193798e8636ef744a5960441726cb12a5510706f7b8c1757e9f719c756d0beabc355cde8ec626c9bd4f14f7ff84894d0cc6da SHA512 bdd3993b3fee24d3332db720df2880493eeb0724cd5b099ccdd5fe6456df1b344132e4e585271999df355fb2042954cb3d452e6dc0b92dead288e94dd71f627c
+DIST nginx-vts-exporter-0.10.3.tar.gz 149578 BLAKE2B c73a8cfdb875fcc02d3b7d66f5b436b9e3e8d516c8a241062721e3124452722e9e30abefd5c79e89772a480fad005d0cf25d0359dd253a39d7ae5a20495f074a SHA512 0ee97be313dc829ae9e23bc836d7e11106c4843306583ff8baa38fa10bd9d56396ae3f6ce12cad4e08a383047c3179013962284aef6e627b23b89c72c564789e
diff --git a/app-metrics/nginx-vts-exporter/nginx-vts-exporter-0.10.3.ebuild b/app-metrics/nginx-vts-exporter/nginx-vts-exporter-0.10.3.ebuild
new file mode 100644
index 000000000000..87d75798a8d7
--- /dev/null
+++ b/app-metrics/nginx-vts-exporter/nginx-vts-exporter-0.10.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="github.com/hnlq715/nginx-vts-exporter"
+EXPORTER_COMMIT="8aa2881c7050d9b28f2312d7ce99d93458611d04"
+ARCHIVE_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Nginx virtual host traffic stats exporter for Prometheus"
+HOMEPAGE="https://github.com/hnlq715/nginx-vts-exporter"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-util/promu"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ default
+ sed -i -e "/-s$/d" -e "s/{{.Revision}}/${EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ mkdir -p bin || die
+ GOPATH="${S}" promu build -v --prefix bin || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin bin/${PN}
+ dodoc README.md
+ popd || die
+ keepdir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}