1 |
|
# Copyright 1999-2020 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
|
4 |
EAPI=8
|
5 |
5 |
inherit go-module
|
6 |
|
COMMIT=f5e8ebea31d6fa128ae3a2fb1b747fdf4b782b2b
|
7 |
|
BRANCH=0.11.0
|
|
6 |
|
|
7 |
# update these on every bump
|
|
8 |
BRANCH='tags/v0.39.0^0'
|
|
9 |
COMMIT=430098a28613273e386563a84c57b9e84dc1a298
|
8 |
10 |
|
9 |
11 |
DESCRIPTION="Prometheus exporter for MongoDB"
|
10 |
12 |
HOMEPAGE="https://github.com/percona/mongodb_exporter"
|
11 |
13 |
SRC_URI="https://github.com/percona/mongodb_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
14 |
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
|
12 |
15 |
|
13 |
16 |
LICENSE="Apache-2.0 AGPL-3 BSD MIT"
|
14 |
17 |
SLOT="0"
|
... | ... | |
19 |
22 |
DEPEND="${COMMON_DEPEND}"
|
20 |
23 |
RDEPEND="${COMMON_DEPEND}"
|
21 |
24 |
|
|
25 |
# tests require docker compose
|
|
26 |
RESTRICT="test"
|
|
27 |
|
22 |
28 |
src_compile() {
|
23 |
|
GOFLAGS="${GOFLAGS} -mod=vendor" emake \
|
24 |
|
TRAVIS_TAG="${PV}" \
|
25 |
|
APP_REVISION=${COMMIT} \
|
26 |
|
TRAVIS_BRANCH=${BRANCH} \
|
|
29 |
emake \
|
|
30 |
COMPONENT_BRANCH=${BRANCH} \
|
|
31 |
COMPONENT_VERSION=${PV} \
|
|
32 |
PMM_RELEASE_FULLCOMMIT=${COMMIT} \
|
27 |
33 |
build
|
28 |
34 |
}
|
29 |
35 |
|
30 |
36 |
src_install() {
|
31 |
|
dobin bin/${PN}
|
32 |
|
dodoc {README,CHANGELOG}.md
|
33 |
|
keepdir /var/log/mongodb_exporter
|
34 |
|
fowners ${PN}:${PN} /var/log/mongodb_exporter
|
|
37 |
dobin ${PN}
|
|
38 |
dodoc CHANGELOG {CONTRIBUTING,README,REFERENCE}.md
|
35 |
39 |
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
36 |
40 |
newconfd "${FILESDIR}"/${PN}.confd ${PN}
|
|
41 |
keepdir /var/log/mongodb_exporter
|
|
42 |
fowners ${PN}:${PN} /var/log/mongodb_exporter
|
37 |
43 |
}
|