diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-12-20 01:04:53 -0800 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-12-20 01:04:53 -0800 |
commit | e4fce80f07754de9465f3d2b1edbbd028ba34110 (patch) | |
tree | 193c3e7b7afdb07f66f76cb61ce012a2b5c9e035 /app-containers/reg/reg-0.16.1.ebuild | |
parent | Move {app-emulation -> app-containers}/docker (diff) | |
download | gentoo-e4fce80f07754de9465f3d2b1edbbd028ba34110.tar.gz gentoo-e4fce80f07754de9465f3d2b1edbbd028ba34110.tar.bz2 gentoo-e4fce80f07754de9465f3d2b1edbbd028ba34110.zip |
Move {app-emulation -> app-containers}/reg
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'app-containers/reg/reg-0.16.1.ebuild')
-rw-r--r-- | app-containers/reg/reg-0.16.1.ebuild | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/app-containers/reg/reg-0.16.1.ebuild b/app-containers/reg/reg-0.16.1.ebuild new file mode 100644 index 000000000000..bfd5ac25d064 --- /dev/null +++ b/app-containers/reg/reg-0.16.1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_VENDOR=( "gopkg.in/yaml.v2 eb3733d160e7 github.com/go-yaml/yaml" ) + +inherit golang-build golang-vcs-snapshot user + +EGO_PN="github.com/genuinetools/reg" +GIT_COMMIT="4203e559f331009df04a3ca47820989c6c43e138" +ARCHIVE_URI="https://${EGO_PN}/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz + ${EGO_VENDOR_URI}" +KEYWORDS="~amd64" + +DESCRIPTION="Docker registry v2 command line client" +HOMEPAGE="https://github.com/genuinetools/reg" +SRC_URI="${ARCHIVE_URI}" +LICENSE="MIT Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC" +SLOT="0" +IUSE="" + +RESTRICT="test" + +pkg_setup() { + enewgroup reg + enewuser reg -1 -1 /var/lib/reg reg +} + +src_prepare() { + pushd src/${EGO_PN} || die + eapply "${FILESDIR}"/reg-0.16.0-config.patch + default + popd || die +} + +src_compile() { + export -n GOCACHE GOPATH XDG_CACHE_HOME + pushd src/${EGO_PN} || die + GO111MODULE=on go build -mod=vendor -v -ldflags "-X ${EGO_PN}/version.GITCOMMIT=${GIT_COMMIT} -X ${EGO_PN}/version.VERSION=${PV}" -o "${S}"/bin/reg . || die + popd || die +} + +src_install() { + dobin bin/* + dodoc src/${EGO_PN}/README.md + insinto /var/lib/${PN} + doins -r src/${EGO_PN}/server/* + newinitd "${FILESDIR}"/reg.initd reg + newconfd "${FILESDIR}"/reg.confd reg + + keepdir /var/log/reg + fowners -R reg:reg /var/log/reg /var/lib/reg/static +} |