1 |
commit: 1e20b1116b7efb496a9bf6eb76d61a4f4c07782a |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 18 16:58:23 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 18 16:58:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e20b111 |
7 |
|
8 |
app-metrics/uwsgi_exporter: migrate to GLEP 81 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/781254 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
.../uwsgi_exporter/uwsgi_exporter-0.8.0-r1.ebuild | 58 ++++++++++++++++++++++ |
15 |
1 file changed, 58 insertions(+) |
16 |
|
17 |
diff --git a/app-metrics/uwsgi_exporter/uwsgi_exporter-0.8.0-r1.ebuild b/app-metrics/uwsgi_exporter/uwsgi_exporter-0.8.0-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..5be77e4e77e |
20 |
--- /dev/null |
21 |
+++ b/app-metrics/uwsgi_exporter/uwsgi_exporter-0.8.0-r1.ebuild |
22 |
@@ -0,0 +1,58 @@ |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+inherit golang-build golang-vcs-snapshot systemd |
29 |
+ |
30 |
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" |
31 |
+EGIT_COMMIT="v${PV/_rc/-rc.}" |
32 |
+EGO_PN="github.com/timonwong/uwsgi_exporter" |
33 |
+UWSGI_EXPORTER_COMMIT="ddbc18f" |
34 |
+ |
35 |
+DESCRIPTION="uWSGI metrics exporter for prometheus.io" |
36 |
+HOMEPAGE="https://github.com/timonwong/uwsgi_exporter" |
37 |
+SRC_URI="${ARCHIVE_URI}" |
38 |
+ |
39 |
+LICENSE="Apache-2.0 BSD ISC MIT" |
40 |
+SLOT="0" |
41 |
+KEYWORDS="~amd64" |
42 |
+ |
43 |
+RDEPEND=" |
44 |
+ acct-group/uwsgi_exporter |
45 |
+ acct-user/uwsgi_exporter |
46 |
+" |
47 |
+ |
48 |
+DEPEND=" |
49 |
+ ${RDEPEND} |
50 |
+ dev-util/promu |
51 |
+" |
52 |
+ |
53 |
+src_prepare() { |
54 |
+ default |
55 |
+ sed -e "s/{{.Revision}}/${UWSGI_EXPORTER_COMMIT}/" -i src/${EGO_PN}/.promu.yml || die |
56 |
+} |
57 |
+ |
58 |
+src_compile() { |
59 |
+ pushd src/${EGO_PN} || die |
60 |
+ mkdir -p bin || die |
61 |
+ GOPATH="${S}" promu build -v --prefix bin || die |
62 |
+ popd || die |
63 |
+} |
64 |
+ |
65 |
+src_install() { |
66 |
+ pushd src/${EGO_PN} || die |
67 |
+ dobin bin/uwsgi_exporter |
68 |
+ dodoc README.md |
69 |
+ popd || die |
70 |
+ local dir |
71 |
+ for dir in /var/log/${PN}; do |
72 |
+ keepdir "${dir}" |
73 |
+ fowners ${PN}:${PN} "${dir}" |
74 |
+ done |
75 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
76 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
77 |
+ insinto /etc/logrotate.d |
78 |
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}" |
79 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
80 |
+} |