blob: 456a74724b5724bb47a3be876fba0c2bef4ff006 (
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
56
57
58
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="A suite of programs to use native stores to keep Docker credentials safe"
HOMEPAGE="https://github.com/docker/docker-credential-helpers"
EGO_PN=github.com/docker/docker-credential-helpers
LICENSE="MIT"
SLOT="0"
if [[ ${PV} = *9999* ]]; then
inherit golang-vcs
else
KEYWORDS="amd64 arm64"
EGIT_COMMIT="v${PV}"
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
inherit golang-vcs-snapshot
fi
inherit golang-build
IUSE="gnome-keyring pass"
REQUIRED_USE="|| ( gnome-keyring pass )"
RESTRICT="test"
DEPEND="gnome-keyring? ( app-crypt/libsecret )"
RDEPEND="(
${DEPEND}
pass? ( app-admin/pass )
)
"
S="${WORKDIR}/${P}/src/${EGO_PN}"
src_compile() {
local -x GOPATH="${WORKDIR}/${P}"
use gnome-keyring && emake secretservice
use pass && emake pass
}
src_install() {
dobin bin/*
dodoc CHANGELOG.md MAINTAINERS README.md
}
pkg_postinst() {
if use gnome-keyring; then
elog "For gnome-keyring/kwallet add:\n"
elog ' "credStore": "secretservice"'"\n"
fi
if use pass; then
elog "For 'pass' add:\n"
elog ' "credStore": "pass"'"\n"
fi
elog "to your ~/.docker/config.json"
}
|