app-metrics/uwsgi_exporter: Bump to version 0.8.0
authorZac Medico <zmedico@gentoo.org>
Sat, 21 Sep 2019 02:47:00 +0000 (19:47 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 21 Sep 2019 02:47:00 +0000 (19:47 -0700)
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Zac Medico <zmedico@gentoo.org>
app-metrics/uwsgi_exporter/Manifest
app-metrics/uwsgi_exporter/uwsgi_exporter-0.8.0.ebuild [new file with mode: 0644]

index b4a5124da24dcddf9a4979ade5ca24b578e2eea9..658891a62f9b0bb948fa7d5bf9791c2a03da26c5 100644 (file)
@@ -1 +1,2 @@
 DIST uwsgi_exporter-0.7.0.tar.gz 3039893 BLAKE2B a6efdae7f9a19ad21a283b586b5667bd99456274ed419d1b64aaf4cdb4df1e1c4fb2a08edf6df2b15813d21311fe54c2f2394f0bf25ac11c49db8a924596da05 SHA512 380ef4515eaa81d4dee853682efa7a5e82af2ec00c096e7471028c9932d46e0a7406b75cb40f0f8efec15cd77b06c5477a07919d0b44720e3e194b5bb023b593
+DIST uwsgi_exporter-0.8.0.tar.gz 3040547 BLAKE2B 5b6769487b3a08752cdff9dccc727096bc6b9d49e12e8aa35d04bbd0c3534503c19a4dda882c7efd7409549f3cae750021fa7ce87d12b798a2998efcdfc9f1cf SHA512 a5a1439f554749c7db4857651a11cbbf0ad0a0a8da0ffd421e374fe08194ba289a6bb04a95e4169ba6a75d0358c7a96e5b9f3cc5813cc39004f81dce42edb3ed
diff --git a/app-metrics/uwsgi_exporter/uwsgi_exporter-0.8.0.ebuild b/app-metrics/uwsgi_exporter/uwsgi_exporter-0.8.0.ebuild
new file mode 100644 (file)
index 0000000..05b3d84
--- /dev/null
@@ -0,0 +1,54 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit user golang-build golang-vcs-snapshot systemd
+
+EGO_PN="github.com/timonwong/uwsgi_exporter"
+EGIT_COMMIT="v${PV/_rc/-rc.}"
+UWSGI_EXPORTER_COMMIT="ddbc18f"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="uWSGI metrics exporter for prometheus.io"
+HOMEPAGE="https://github.com/timonwong/uwsgi_exporter"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0 BSD ISC 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/{{.Revision}}/${UWSGI_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/uwsgi_exporter
+       dodoc README.md
+       popd || die
+       local dir
+       for dir in /var/{lib,log}/${PN}; do
+               keepdir "${dir}"
+               fowners ${PN}:${PN} "${dir}"
+       done
+       newinitd "${FILESDIR}"/${PN}.initd ${PN}
+       newconfd "${FILESDIR}"/${PN}.confd ${PN}
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+       systemd_dounit "${FILESDIR}/${PN}.service"
+}