dev-util/docker-distribution-pruner: Initial version
[gentoo.git] / dev-util / docker-distribution-pruner / docker-distribution-pruner-0_p20170401.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 EGO_PN="gitlab.com/gitlab-org/${PN}/..."
7 EGIT_COMMIT="207b308c12b1717c6e3d2adf5e1ffe504c64f56e"
8
9 EGO_VENDOR=( "gopkg.in/yaml.v2 a3f3340b5840cee44f372bddb5880fcbc419b46a github.com/go-yaml/yaml" )
10
11 inherit golang-build golang-vcs-snapshot
12
13 ARCHIVE_URI="https://${EGO_PN%/*}/repository/archive.tar.gz?ref=${EGIT_COMMIT} -> ${P}.tar.gz"
14 KEYWORDS="~amd64"
15
16 DESCRIPTION="Clean all old container revisions from registry"
17 HOMEPAGE="https://gitlab.com/gitlab-org/docker-distribution-pruner"
18 SRC_URI="${ARCHIVE_URI}
19         ${EGO_VENDOR_URI}"
20 LICENSE="MIT"
21 SLOT="0"
22 IUSE=""
23
24 RESTRICT="test"
25
26 src_compile() {
27         pushd src || die
28         GOPATH="${WORKDIR}/${P}" go install gitlab.com/gitlab-org/docker-distribution-pruner || die
29         popd || die
30 }
31
32 src_install() {
33         dobin bin/${PN}
34 }