Lines 1-35
Link Here
|
1 |
# Copyright 1999-2020 Gentoo Authors |
1 |
# Copyright 1999-2020 Gentoo Authors |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
3 |
|
4 |
EAPI=7 |
4 |
EAPI=8 |
5 |
inherit go-module |
5 |
inherit go-module |
6 |
COMMIT=f5e8ebea31d6fa128ae3a2fb1b747fdf4b782b2b |
|
|
7 |
BRANCH=0.11.0 |
8 |
|
6 |
|
9 |
DESCRIPTION="Prometheus exporter for MongoDB" |
7 |
DESCRIPTION="Prometheus exporter for MongoDB" |
10 |
HOMEPAGE="https://github.com/percona/mongodb_exporter" |
8 |
HOMEPAGE="https://github.com/percona/mongodb_exporter" |
11 |
SRC_URI="https://github.com/percona/mongodb_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
9 |
SRC_URI="https://github.com/percona/mongodb_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
|
|
10 |
SRC_URI+=" ${P}-deps.tar.xz" |
12 |
|
11 |
|
13 |
LICENSE="Apache-2.0 AGPL-3 BSD MIT" |
12 |
LICENSE="Apache-2.0 AGPL-3 BSD MIT" |
14 |
SLOT="0" |
13 |
SLOT="0" |
15 |
KEYWORDS="~amd64" |
14 |
KEYWORDS="~amd64" |
|
|
15 |
RESTRICT="test" |
16 |
|
16 |
|
17 |
COMMON_DEPEND="acct-group/mongodb_exporter |
17 |
RDEPEND=" |
|
|
18 |
acct-group/mongodb_exporter |
18 |
acct-user/mongodb_exporter" |
19 |
acct-user/mongodb_exporter" |
19 |
DEPEND="${COMMON_DEPEND}" |
20 |
DEPEND="${RDEPEND}" |
20 |
RDEPEND="${COMMON_DEPEND}" |
|
|
21 |
|
21 |
|
22 |
src_compile() { |
22 |
src_compile() { |
23 |
GOFLAGS="${GOFLAGS} -mod=vendor" emake \ |
23 |
GOFLAGS="${GOFLAGS}" emake \ |
24 |
TRAVIS_TAG="${PV}" \ |
24 |
COMPONENT_VERSION="${PV}" \ |
25 |
APP_REVISION=${COMMIT} \ |
25 |
COMPONENT_BRANCH="main" \ |
26 |
TRAVIS_BRANCH=${BRANCH} \ |
26 |
PMM_RELEASE_FULLCOMMIT="" \ |
27 |
build |
27 |
build |
28 |
} |
28 |
} |
29 |
|
29 |
|
30 |
src_install() { |
30 |
src_install() { |
31 |
dobin bin/${PN} |
31 |
dobin ${PN} |
32 |
dodoc {README,CHANGELOG}.md |
32 |
dodoc {README,REFERENCE}.md CHANGELOG |
33 |
keepdir /var/log/mongodb_exporter |
33 |
keepdir /var/log/mongodb_exporter |
34 |
fowners ${PN}:${PN} /var/log/mongodb_exporter |
34 |
fowners ${PN}:${PN} /var/log/mongodb_exporter |
35 |
newinitd "${FILESDIR}"/${PN}.initd ${PN} |
35 |
newinitd "${FILESDIR}"/${PN}.initd ${PN} |