Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/cadvisor/
Date: Thu, 25 Jan 2018 18:51:58
Message-Id: 1516906290.1ef670ac35412791e58e250a6f4e77fbdd80f1e9.mrueg@gentoo
1 commit: 1ef670ac35412791e58e250a6f4e77fbdd80f1e9
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 25 18:49:09 2018 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 25 18:51:30 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ef670ac
7
8 app-emulation/cadvisor: Fix build and issues with init file
9
10 Package-Manager: Portage-2.3.19, Repoman-2.3.6
11
12 app-emulation/cadvisor/cadvisor-0.28.3-r1.ebuild | 43 ++++++++++++++++++++++++
13 1 file changed, 43 insertions(+)
14
15 diff --git a/app-emulation/cadvisor/cadvisor-0.28.3-r1.ebuild b/app-emulation/cadvisor/cadvisor-0.28.3-r1.ebuild
16 new file mode 100644
17 index 00000000000..a9f0af88b2d
18 --- /dev/null
19 +++ b/app-emulation/cadvisor/cadvisor-0.28.3-r1.ebuild
20 @@ -0,0 +1,43 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +EGO_PN="github.com/google/cadvisor"
26 +
27 +inherit user golang-build golang-vcs-snapshot
28 +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
29 +COMMIT="1e567c2"
30 +KEYWORDS="~amd64"
31 +
32 +DESCRIPTION="Analyzes resource usage and performance characteristics of running containers"
33 +HOMEPAGE="https://github.com/google/cadvisor"
34 +
35 +LICENSE="Apache-2.0"
36 +SLOT="0"
37 +IUSE=""
38 +
39 +pkg_setup() {
40 + enewgroup ${PN}
41 + enewuser ${PN} -1 -1 /dev/null ${PN}
42 +}
43 +
44 +src_prepare() {
45 + sed -i -e "/go get/d" src/${EGO_PN}/build/assets.sh || die
46 + sed -i -e "s/git describe.*/echo ${PV} )/"\
47 + -e "s/git rev-parse --short HEAD.*/echo ${COMMIT} )/"\
48 + src/${EGO_PN}/build/build.sh || die
49 + default
50 +}
51 +
52 +src_compile() {
53 + pushd "src/${EGO_PN}"
54 + GO_FLAGS="-v -work -x" VERBOSE="true" GOPATH="${S}:$(get_golibdir_gopath)" emake build
55 + popd || die
56 +}
57 +
58 +src_install() {
59 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
60 + dobin src/${EGO_PN}/${PN}
61 + keepdir /var/log/${PN}
62 + fowners ${PN}:${PN} /var/log/${PN}
63 +}