aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker-registry/APKBUILD
blob: d67ac5917d31e176670dd0cc8f9847db25b7ac70 (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
# Maintainer: Christian Kampka <christian@kampka.net>

pkgname=docker-registry
pkgver=2.5.1
pkgrel=0
pkgdesc="An implementation of the Docker Registry HTTP API V2 for use with docker 1.6+"
url="https://github.com/docker/distribution"
arch="x86 x86_64"
license="ASL-2.0"
makedepends="git go"
options="!strip"
install="$pkgname.pre-install"
pkguserss="docker-registry"
pkggroups="docker-registry"
source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz
	docker-registry.initd"
builddir="$srcdir/distribution-$pkgver"

build() {
	cd "$builddir"

	# GOPATH fix
	mkdir -p Godeps/_workspace/src/github.com/docker
	ln -s "$builddir" Godeps/_workspace/src/github.com/docker/distribution || return 1

	make clean binaries \
		DISTRIBUTION_DIR="$builddir" \
		GOPATH="$builddir/Godeps/_workspace" \
		|| return 1
}

package() {
	cd "$builddir"

	install -D -m 755 bin/registry \
		"$pkgdir"/usr/bin/$pkgname || return 1

	install -D -m 644 cmd/registry/config-example.yml \
		"$pkgdir"/etc/$pkgname/config.yml || return 1

	install -D -m 644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname || return 1

	install -D -m 755 "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
}

md5sums="97f16e2b738b1953c5b62a2275f967be  docker-registry-2.5.1.tar.gz
eaa66ce1509f0b2f257e2919b350fc46  docker-registry.initd"
sha256sums="d98ebca3518c17d95468b1d40b87861036001301a16a50563203e4b9af72c514  docker-registry-2.5.1.tar.gz
d35bfa20956a4dbd6070799fa8a1fd34c100070672e24c9b759df23c69b5431a  docker-registry.initd"
sha512sums="5217e2ca361d71806c8ec4da1cf1c2c5dc4160b84c2a98feae50872342d0acf116768a3acf00769bafd66e73c9922c7fe97cbde51955d8aa1d1ed914de2e3d34  docker-registry-2.5.1.tar.gz
338d78b6813825154673c50cd73884297ebdd8c497ec933048dc5bf0863136e7bc308860ce71835d7e48a2b950266a69e60d318e382b18f8352d6c662851ed09  docker-registry.initd"