blob: 66de7cc44abf0fc44d9d48d994b9b9c9577c1921 (
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
|
# Maintainer: grimsock <lord.grimsock at gmail dot com>
# Contributor: Michael Goehler <somebody dot here at gmx dot de>
pkgname=docker-registry-git
_pkgname=docker-registry
pkgver=v2.6.0.rc.1.55.g2d500932
pkgrel=1
pkgdesc="An implementation of the Docker Registry HTTP API V2 for use with docker 1.6+."
arch=('any')
url="https://github.com/docker/distribution"
license=('Apache')
makedepends=('git' 'go')
backup=("etc/${_pkgname}/config.yml")
source=('distribution::git+https://github.com/docker/distribution.git'
'docker-registry.service')
md5sums=('SKIP'
'6602a69661349de0f2c020effbcf417a')
pkgver() {
cd "${srcdir}/distribution"
git describe --match 'v[0-9]*' --dirty='.m' --always | sed 's/-/./g'
}
build() {
export DISTRIBUTION_DIR="${srcdir}/distribution"
export GOPATH="${DISTRIBUTION_DIR}/Godeps/_workspace"
cd "${DISTRIBUTION_DIR}"
# GOPATH fix
mkdir -p "$GOPATH/src/github.com/docker"
ln -s "${DISTRIBUTION_DIR}" "${DISTRIBUTION_DIR}/Godeps/_workspace/src/github.com/docker/distribution"
make clean binaries
}
package() {
export DISTRIBUTION_DIR="${srcdir}/distribution"
install -v -D -m644 "${srcdir}/${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
install -v -D -m755 "${DISTRIBUTION_DIR}/bin/registry" "${pkgdir}/usr/lib/${_pkgname}/registry"
install -v -D -m644 "${DISTRIBUTION_DIR}/cmd/registry/config-example.yml" "${pkgdir}/etc/${_pkgname}/config.yml"
install -v -d -m755 "${pkgdir}/var/lib/registry"
}
# vim:set ts=4 sw=4 et:
|