diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-02-25 13:47:10 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-02-25 14:10:39 +0100 |
commit | a6c484ebf934b04b9fdeb98fd3923bfb53549e05 (patch) | |
tree | 98d887b1e7d69839354536b30cf47e88be68e69a /community/docker-registry | |
parent | 1c8a50547da3deec5201896ae1805ac2ca20a8aa (diff) | |
download | aports-a6c484ebf934b04b9fdeb98fd3923bfb53549e05.tar.bz2 aports-a6c484ebf934b04b9fdeb98fd3923bfb53549e05.tar.xz |
community/docker-registry: improve abuild
Diffstat (limited to 'community/docker-registry')
-rw-r--r-- | community/docker-registry/APKBUILD | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/community/docker-registry/APKBUILD b/community/docker-registry/APKBUILD index da1b98d670..d67ac5917d 100644 --- a/community/docker-registry/APKBUILD +++ b/community/docker-registry/APKBUILD @@ -3,46 +3,48 @@ 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+." +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="Apache 2.0" +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 +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 -} +builddir="$srcdir/distribution-$pkgver" build() { - export DISTRIBUTION_DIR="${_builddir}" - export GOPATH="${DISTRIBUTION_DIR}/Godeps/_workspace" - cd "${DISTRIBUTION_DIR}" + cd "$builddir" + # GOPATH fix - mkdir -p "${DISTRIBUTION_DIR}/Godeps/_workspace/src/github.com/docker/" || return 1 - ln -s "${DISTRIBUTION_DIR}" "${DISTRIBUTION_DIR}/Godeps/_workspace/src/github.com/docker/distribution" || return 1 - make clean binaries || return 1 + 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() { - 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-example.yml" "${pkgdir}/etc/${pkgname}/config.yml" - install -v -D -m644 ${_builddir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname} + 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 |