summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2021-07-18 18:38:40 +0200
committerConrad Kostecki <conikost@gentoo.org>2021-07-18 18:38:40 +0200
commitd8d84438d9d7854b4c38c2c0ddd2f82ebca7060f (patch)
tree439971b22a746ecaaf1623fe27f9546f5d5c3f6a /app-emulation/docker-registry
parentacct-user/registry: add user (295) registry (diff)
downloadgentoo-d8d84438d9d7854b4c38c2c0ddd2f82ebca7060f.tar.gz
gentoo-d8d84438d9d7854b4c38c2c0ddd2f82ebca7060f.tar.bz2
gentoo-d8d84438d9d7854b4c38c2c0ddd2f82ebca7060f.zip
app-emulation/docker-registry: migrate to GLEP 81
Bug: https://bugs.gentoo.org/781215 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'app-emulation/docker-registry')
-rw-r--r--app-emulation/docker-registry/docker-registry-2.7.1-r1.ebuild55
1 files changed, 55 insertions, 0 deletions
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
new file mode 100644
index 000000000000..78708f327413
--- /dev/null
+++ b/app-emulation/docker-registry/docker-registry-2.7.1-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit golang-vcs-snapshot systemd
+
+EGIT_COMMIT="2461543d988979529609e8cb6fca9ca190dc48da"
+EGO_PN="github.com/docker/distribution"
+
+DESCRIPTION="Docker Registry 2.0"
+HOMEPAGE="https://github.com/docker/distribution"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 MIT ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ~arm64"
+
+DEPEND="
+ acct-group/registry
+ acct-user/registry
+"
+RDEPEND="${DEPEND}"
+
+SVCNAME="registry"
+
+src_prepare() {
+ default
+ pushd src/${EGO_PN} || die
+ eapply "${FILESDIR}"/${PN}-2.7.0-notification-metrics.patch
+ sed -e "s/git describe.*/echo ${PV})/" \
+ -e "s/git rev-parse.*/echo ${EGIT_COMMIT})/" \
+ -e "s/-s -w/-w/" \
+ -i Makefile || die
+ popd || die
+}
+
+src_compile() {
+ export -n GOCACHE XDG_CACHE_HOME #681072
+ GOPATH="${S}" GO_BUILD_FLAGS="-v" emake -C src/${EGO_PN} binaries
+}
+
+src_install() {
+ exeinto /usr/libexec/${PN}
+ doexe src/${EGO_PN}/bin/*
+ insinto /etc/docker/registry
+ newins src/${EGO_PN}/cmd/registry/config-example.yml config.yml.example
+ newinitd "${FILESDIR}/${SVCNAME}.initd" "${SVCNAME}"
+ newconfd "${FILESDIR}/${SVCNAME}.confd" "${SVCNAME}"
+ systemd_dounit "${FILESDIR}/${SVCNAME}.service"
+ keepdir /var/log/${SVCNAME}
+ fowners ${SVCNAME}:${SVCNAME} /var/log/${SVCNAME}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${SVCNAME}.logrotated" "${SVCNAME}"
+}