Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/docker-registry/
Date: Sun, 18 Jul 2021 17:00:51
Message-Id: 1626626320.d8d84438d9d7854b4c38c2c0ddd2f82ebca7060f.conikost@gentoo
1 commit: d8d84438d9d7854b4c38c2c0ddd2f82ebca7060f
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 18 16:38:40 2021 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 18 16:38:40 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8d84438
7
8 app-emulation/docker-registry: migrate to GLEP 81
9
10 Bug: https://bugs.gentoo.org/781215
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
13
14 .../docker-registry-2.7.1-r1.ebuild | 55 ++++++++++++++++++++++
15 1 file changed, 55 insertions(+)
16
17 diff --git a/app-emulation/docker-registry/docker-registry-2.7.1-r1.ebuild b/app-emulation/docker-registry/docker-registry-2.7.1-r1.ebuild
18 new file mode 100644
19 index 00000000000..78708f32741
20 --- /dev/null
21 +++ b/app-emulation/docker-registry/docker-registry-2.7.1-r1.ebuild
22 @@ -0,0 +1,55 @@
23 +# Copyright 1999-2021 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +inherit golang-vcs-snapshot systemd
29 +
30 +EGIT_COMMIT="2461543d988979529609e8cb6fca9ca190dc48da"
31 +EGO_PN="github.com/docker/distribution"
32 +
33 +DESCRIPTION="Docker Registry 2.0"
34 +HOMEPAGE="https://github.com/docker/distribution"
35 +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
36 +
37 +LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 MIT ZLIB"
38 +SLOT="0"
39 +KEYWORDS="amd64 ~arm64"
40 +
41 +DEPEND="
42 + acct-group/registry
43 + acct-user/registry
44 +"
45 +RDEPEND="${DEPEND}"
46 +
47 +SVCNAME="registry"
48 +
49 +src_prepare() {
50 + default
51 + pushd src/${EGO_PN} || die
52 + eapply "${FILESDIR}"/${PN}-2.7.0-notification-metrics.patch
53 + sed -e "s/git describe.*/echo ${PV})/" \
54 + -e "s/git rev-parse.*/echo ${EGIT_COMMIT})/" \
55 + -e "s/-s -w/-w/" \
56 + -i Makefile || die
57 + popd || die
58 +}
59 +
60 +src_compile() {
61 + export -n GOCACHE XDG_CACHE_HOME #681072
62 + GOPATH="${S}" GO_BUILD_FLAGS="-v" emake -C src/${EGO_PN} binaries
63 +}
64 +
65 +src_install() {
66 + exeinto /usr/libexec/${PN}
67 + doexe src/${EGO_PN}/bin/*
68 + insinto /etc/docker/registry
69 + newins src/${EGO_PN}/cmd/registry/config-example.yml config.yml.example
70 + newinitd "${FILESDIR}/${SVCNAME}.initd" "${SVCNAME}"
71 + newconfd "${FILESDIR}/${SVCNAME}.confd" "${SVCNAME}"
72 + systemd_dounit "${FILESDIR}/${SVCNAME}.service"
73 + keepdir /var/log/${SVCNAME}
74 + fowners ${SVCNAME}:${SVCNAME} /var/log/${SVCNAME}
75 + insinto /etc/logrotate.d
76 + newins "${FILESDIR}/${SVCNAME}.logrotated" "${SVCNAME}"
77 +}