1 |
commit: 61423c537f9ea536387e240e0bd2875b10b147bf |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 13 18:13:39 2019 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 13 18:16:28 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61423c53 |
7 |
|
8 |
app-metrics/github-exporter: 04-r1 revbump to create the user |
9 |
|
10 |
Package-Manager: Portage-2.3.55, Repoman-2.3.12 |
11 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
12 |
|
13 |
.../github-exporter/github-exporter-04-r1.ebuild | 75 ++++++++++++++++++++++ |
14 |
1 file changed, 75 insertions(+) |
15 |
|
16 |
diff --git a/app-metrics/github-exporter/github-exporter-04-r1.ebuild b/app-metrics/github-exporter/github-exporter-04-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..f61b022c35f |
19 |
--- /dev/null |
20 |
+++ b/app-metrics/github-exporter/github-exporter-04-r1.ebuild |
21 |
@@ -0,0 +1,75 @@ |
22 |
+# Copyright 2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=6 |
26 |
+EGO_PN=github.com/infinityworks/github-exporter |
27 |
+ |
28 |
+EGO_VENDOR=( |
29 |
+ "github.com/beorn7/perks 3a771d9" |
30 |
+ "github.com/fatih/structs 878a968" |
31 |
+ "github.com/golang/protobuf 347cf4a" |
32 |
+ "github.com/infinityworks/go-common 7f20a14" |
33 |
+ "github.com/matttproud/golang_protobuf_extensions c182aff" |
34 |
+ "github.com/prometheus/client_golang d2ead25" |
35 |
+ "github.com/prometheus/client_model f287a10" |
36 |
+ "github.com/prometheus/common 2998b13" |
37 |
+ "github.com/prometheus/procfs b1a0a9a" |
38 |
+ "github.com/sirupsen/logrus eef6b76" |
39 |
+ "golang.org/x/crypto ff983b9 github.com/golang/crypto" |
40 |
+ "golang.org/x/sys 48ac38b github.com/golang/sys" |
41 |
+) |
42 |
+ |
43 |
+inherit golang-build golang-vcs-snapshot user systemd |
44 |
+ |
45 |
+DESCRIPTION="Github statistics exporter for prometheus" |
46 |
+HOMEPAGE="https://github.com/infinityworks/github-exporter" |
47 |
+SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz |
48 |
+ ${EGO_VENDOR_URI}" |
49 |
+ |
50 |
+LICENSE="MIT" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~amd64" |
53 |
+ |
54 |
+RESTRICT="strip" |
55 |
+ |
56 |
+pkg_setup() { |
57 |
+ enewgroup ${PN} |
58 |
+ enewuser ${PN} -1 -1 -1 ${PN} |
59 |
+} |
60 |
+ |
61 |
+src_prepare() { |
62 |
+ default |
63 |
+ sed -i -e 's/infinityworksltd/infinityworks/' \ |
64 |
+ "src/${EGO_PN}/main.go" \ |
65 |
+ "src/${EGO_PN}/config/config.go" \ |
66 |
+ "src/${EGO_PN}/exporter/structs.go" \ |
67 |
+ || die "sed failed" |
68 |
+ sed -i -e 's/Sirupsen/sirupsen/' \ |
69 |
+ "src/${EGO_PN}/main.go" \ |
70 |
+ "src/${EGO_PN}/config/config.go" \ |
71 |
+ "src/${EGO_PN}/exporter/gather.go" \ |
72 |
+ "src/${EGO_PN}/exporter/http.go" \ |
73 |
+ "src/${EGO_PN}/exporter/prometheus.go" \ |
74 |
+ || die "sed failed" |
75 |
+} |
76 |
+ |
77 |
+src_compile() { |
78 |
+ set -- env GOPATH="${S}" go build -v "${EGO_PN}" |
79 |
+ echo "$@" |
80 |
+ "$@" || die "build failed" |
81 |
+} |
82 |
+ |
83 |
+src_install() { |
84 |
+ dobin ${PN} |
85 |
+ cd "src/${EGO_PN}" || die |
86 |
+dodoc *.md |
87 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
88 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
89 |
+} |
90 |
+ |
91 |
+pkg_postinst() { |
92 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
93 |
+ elog "Before you can use ${PN}, you must configure it in" |
94 |
+ elog "${EROOT}/etc/conf.d/${PN}" |
95 |
+ fi |
96 |
+} |