aboutsummaryrefslogtreecommitdiffstats
path: root/testing/docker-registry/APKBUILD
blob: 356e61a44376955a3473ad0491d7bf8d292bd35c (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
# Maintainer: Chritsian Kampka <christian at kampka dot net>
pkgname=docker-registry
pkgver=2.0.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_64"
license="MIT"
makedepends="git go"
backup="/etc/${pkgname}/config.yml"
source="
  $pkgname-$pkgver.tar.gz::${url}/archive/v${pkgver}.tar.gz
	docker-registry.initd
	"

_builddir="$srcdir/distribution-$pkgver"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
    export DISTRIBUTION_DIR="${_builddir}"
    export GOPATH="${DISTRIBUTION_DIR}/Godeps/_workspace"
    cd "${DISTRIBUTION_DIR}"

    # GOPATH fix
    ln -s "${DISTRIBUTION_DIR}" "${DISTRIBUTION_DIR}/Godeps/_workspace/src/github.com/docker/distribution"

    make clean binaries
}

package() {
    export DISTRIBUTION_DIR="${srcdir}/distribution-${pkgver}"
    install -v -D -m755 "${srcdir}/${pkgname}.initd" "${pkgdir}/etc/init.d/${pkgname}"
    install -v -D -m755 "${DISTRIBUTION_DIR}/bin/registry" "${pkgdir}/usr/bin/${pkgname}"
    install -v -D -m644 "${DISTRIBUTION_DIR}/cmd/registry/config.yml" "${pkgdir}/etc/${pkgname}/config.yml"
}
md5sums="7dc693ced280834bb37913b7164953b7  docker-registry-2.0.1.tar.gz
95f83f704c630aadb167cbcbfad867cb  docker-registry.initd"
sha256sums="1664584c311dac98a8b09880d5c79ffceea7a4e0f2359be70c6a9a6ddd9d804a  docker-registry-2.0.1.tar.gz
f4cbf23714741b3a867ef0842ccac5b9236de241dfd9407a22dc97bcc01f2637  docker-registry.initd"
sha512sums="3f8e73f04f2a2ea20eaeb0b065e5107b85fa937680aeac750b59e413aa769de98320b88b573a674b60ebb53291cdae1905e92563c827a7f3c14e9d7db17eeaa9  docker-registry-2.0.1.tar.gz
4aaf59be97cbd5145cfa3a897628fd2193d8967388d0314e22b08981d4bf56d134c119e3abd4751e40f349e535e165e5595c354f04b075f8e872a4feadeddd04  docker-registry.initd"