blob: f09934c26f1ca900daef8e48c6e9fddd63aa5c57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit go-module
EGIT_COMMIT=7825f115dd3ed9f623377821c0351d1eb7aa3a5a
DESCRIPTION="A tool for extracting metrics from application logs"
HOMEPAGE="https://github.com/google/mtail"
SRC_URI="https://github.com/google/mtail/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~zmedico/dist/${P}-tidy.patch.xz
https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz"
LICENSE="Apache-2.0 MPL-2.0 BSD BSD-2 MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="examples"
RDEPEND="!app-misc/mtail"
S="${WORKDIR}/${PN}-${PV/_/-}"
RESTRICT+=" test"
src_unpack() {
unpack ${A}
cd "${S}" || die
eapply "${WORKDIR}/${P}-tidy.patch"
}
src_prepare() {
default
sed \
-e '/go get/d' \
-e 's|^branch :=.*|branch := master|' \
-e "s|^version :=.*|version := v${PV/_/-}|" \
-e "s|^revision :=.*|revision := ${EGIT_COMMIT}|" \
-e "s|^release :=.*|release := v${PV/_/-}|" \
-i Makefile || die
}
src_compile() {
emake
}
src_install() {
dobin mtail
dodoc CONTRIBUTING.md README.md TODO
if use examples; then
insinto "/usr/share/doc/${PF}"
doins -r examples
fi
}
|