blob: 1cb27791309a47af0974560093c3b165148545a2 (
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
|
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit user golang-build golang-vcs-snapshot
EGO_PN="github.com/coreos/clair"
EGIT_COMMIT="v${PV}"
ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
DESCRIPTION="Vulnerability Static Analysis for Containers"
HOMEPAGE="https://github.com/coreos/clair"
SRC_URI="${ARCHIVE_URI}"
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
RDEPEND="app-arch/rpm
app-arch/xz-utils
dev-vcs/git
!!sci-visualization/xd3d" # File collision (Bug #621044)
pkg_setup() {
enewgroup ${PN}
enewuser ${PN} -1 -1 -1 ${PN}
}
src_compile() {
GOPATH="${S}" go build -o bin/${PN} -v ${EGO_PN}/cmd/${PN} || die
}
src_install() {
dobin bin/${PN}
pushd src/${EGO_PN} || die
dodoc {README,ROADMAP,CONTRIBUTING}.md
insinto /etc/${PN}
doins config.example.yaml
popd || die
newinitd "${FILESDIR}"/${PN}.initd ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
keepdir /var/log/${PN}
fowners ${PN}:${PN} /var/log/${PN}
}
|