]> git.pld-linux.org Git - packages/docker-registry.git/blob - docker-registry.spec
cleanup unused leftovers from docker-registry-v1
[packages/docker-registry.git] / docker-registry.spec
1 Summary:        Docker Registry 2.0
2 Name:           docker-registry
3 Version:        2.5.1
4 Release:        1
5 License:        Apache v2.0
6 Group:          Networking/Daemons
7 Source0:        https://github.com/docker/distribution/archive/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  97f16e2b738b1953c5b62a2275f967be
9 URL:            https://github.com/docker/distribution
10 Source1:        %{name}.service
11 Source2:        %{name}.sysconfig
12 Source3:        %{name}.sysvinit
13 BuildRequires:  golang >= 1.5
14 BuildRequires:  rpmbuild(macros) >= 1.714
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 # go stuff
18 %define _enable_debug_packages 0
19 %define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
20 %define import_path     github.com/docker/distribution
21
22 %description
23 Registry server for Docker (hosting/delivering of repositories and
24 images).
25
26 %prep
27 %setup -qc
28
29 # go wants specific directory structure
30 # otherwise version override via ldflags does not work
31 install -d src/$(dirname %{import_path})
32 mv distribution-%{version}/{AUTHORS,*.md} .
33 mv distribution-%{version} src/%{import_path}
34
35 %build
36 export GOPATH=$(pwd)
37 cd src/%{import_path}
38
39 %{__make} binaries \
40         VERSION=v%{version} \
41         DOCKER_BUILDTAGS="include_oss include_gcs"
42
43 v=$(./bin/registry --version)
44 v=$(echo "$v" | awk '{print $NF}')
45 test "$v" = "v%{version}"
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/docker/registry,%{_bindir}}
50
51 cd src/%{import_path}
52 install -p bin/* $RPM_BUILD_ROOT%{_bindir}
53 cp -p cmd/registry/config-dev.yml $RPM_BUILD_ROOT%{_sysconfdir}/docker/registry/config.yml
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %files
59 %defattr(644,root,root,755)
60 %doc AUTHORS README.md ROADMAP.md
61 %dir %{_sysconfdir}/docker
62 %dir %{_sysconfdir}/docker/registry
63 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/docker/registry/config.yml
64 %attr(755,root,root) %{_bindir}/digest
65 %attr(755,root,root) %{_bindir}/registry
66 %attr(755,root,root) %{_bindir}/registry-api-descriptor-template
This page took 0.098384 seconds and 3 git commands to generate.