# Contributor: Christian Kampka # Contributor: Jakub Jirutka # Maintainer: pkgname=docker-registry pkgver=2.8.2 pkgrel=2 pkgdesc="An implementation of the Docker Registry HTTP API V2 for use with docker 1.6+" url="https://github.com/distribution/distribution" # riscv64: undefined syscall arch="all !riscv64" license="Apache-2.0" makedepends="git go" install="$pkgname.pre-install" pkgusers="docker-registry" pkggroups="docker-registry" subpackages="$pkgname-openrc" source="$pkgname-$pkgver.tar.gz::https://github.com/distribution/distribution/archive/v$pkgver.tar.gz log-hook-syslog.patch config-example.patch $pkgname.initd $pkgname.confd $pkgname.logrotate " builddir="$srcdir/src/github.com/docker/distribution" options="net" export GOPATH="$srcdir" export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" prepare() { mkdir -p "${builddir%/*}" mv "$srcdir"/distribution-$pkgver "$builddir" default_prepare } build() { export GO111MODULE=off make binaries \ DISTRIBUTION_DIR="$builddir" \ VERSION="$pkgver" \ REVISION="" } check() { ./bin/registry --version } package() { install -D -m755 bin/registry "$pkgdir"/usr/bin/$pkgname install -D -m640 -o $pkgusers -g $pkggroups \ cmd/registry/config-example.yml "$pkgdir"/etc/$pkgname/config.yml install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname install -D -m644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname install -d -m750 -o $pkgusers -g $pkggroups "$pkgdir"/var/lib/$pkgname } sha512sums=" c2270c14e09399b10fa474a93855e542b82a7746764ec581a218826581e30b76d4d31ae8f91957b8e48a7c14c054b84091c73679e40dbdff1a5bd0de8b18af83 docker-registry-2.8.2.tar.gz 834257d45bc83eef5fe65955b215c450db0c9849fc9d5ddbaef731589f05e82cc8c0dd8a315623e45c4b4b8d463c8c12b53d99ade9029fd42b6d6afdf7f5ca48 log-hook-syslog.patch 9c3a8afd855bb161166fdc38e931a2ad4aaf9a8e97c67d15ea8a098f6f6f800b4c8ef037dbbd0ac954289dbae7b208116751a3c97aa682fa50887ccc7a68a9d7 config-example.patch 7962b2660ee8147b66fc38b7e4c1d7b37ba0b7d64fbddefb970c182bd55e2a841cec885a9459dfa1db7f1a8fcaa0bd9c7eea0b22c9e37854a3081415381c14d4 docker-registry.initd 34d9158cf4b0e04ba9198235629ebe23eb5a7a3dcc70d26cf7f4fd045a7cd8e055476e7e30255f711160aa23af505ca38a8a76302aae7ec24701b3887b874276 docker-registry.confd 979643f6b9a3e12f692dc37f964fddff66f4e08cd74a1094a4be1230e67f83e703207e5420135cebb29aa13ff20a984395168046fd902392ad45d8e3eadcaa0e docker-registry.logrotate "