# Maintainer: Chritsian Kampka pkgname=docker-registry pkgver=2.0.1 pkgrel=1 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="Apache 2.0" makedepends="git go" 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 || return 1 } 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" install -v -D -m644 ${_builddir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname} } md5sums="7dc693ced280834bb37913b7164953b7 docker-registry-2.0.1.tar.gz 7bb346742afa5d44ef15df9855f295b1 docker-registry.initd" sha256sums="1664584c311dac98a8b09880d5c79ffceea7a4e0f2359be70c6a9a6ddd9d804a docker-registry-2.0.1.tar.gz c441b0cfac0fbb45fbc78563a07d812704d06ceb0a3b46b0a4377e55b02c5c21 docker-registry.initd" sha512sums="3f8e73f04f2a2ea20eaeb0b065e5107b85fa937680aeac750b59e413aa769de98320b88b573a674b60ebb53291cdae1905e92563c827a7f3c14e9d7db17eeaa9 docker-registry-2.0.1.tar.gz 4bedcb02d8f8b4f4f778d8c7af889c5d06affae5340a8e6deb228964294ff0257f2035c95c3d65d123a9e1ca9169c29c84a2c8a38c7c0b393b3221442fc447b3 docker-registry.initd"