1 |
%global debug_package %{nil} |
2 |
%global provider github |
3 |
%global provider_tld com |
4 |
%global project containerd |
5 |
%global repo containerd |
6 |
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo} |
7 |
|
8 |
#debuginfo not supported with Go |
9 |
%global gopath %{_libdir}/golang |
10 |
%define gosrc %{gopath}/src/pkg/%{import_path} |
11 |
|
12 |
%global commit 269548fa27e0089a8b8278fc4fc781d7f65a939b |
13 |
%global shortcommit %(c=%{commit}; echo ${c:0:7}) |
14 |
|
15 |
Name: docker-%{repo} |
16 |
Version: 1.4.8 |
17 |
Release: %mkrel 1 |
18 |
Summary: A daemon to control runC |
19 |
License: ASL 2.0 |
20 |
Group: System/Configuration |
21 |
|
22 |
URL: http://www.docker.com |
23 |
Source0: https://%{import_path}/archive/v%{version}.tar.gz |
24 |
#Source0: https://%{import_path}/archive/%{commit}.tar.gz |
25 |
|
26 |
BuildRequires: gcc |
27 |
BuildRequires: glibc-static-devel |
28 |
|
29 |
# ensure build uses golang 1.4 or above |
30 |
BuildRequires: golang >= 1.4 |
31 |
BuildRequires: git |
32 |
BuildRequires: btrfs-devel |
33 |
BuildRequires: pkgconfig(libseccomp) |
34 |
Requires: opencontainers-runc >= 1.0.0rc5 |
35 |
|
36 |
%description |
37 |
containerd is a daemon to control runC, built for performance and density. |
38 |
|
39 |
containerd leverages runC's advanced features such as seccomp and user |
40 |
namespace support as well as checkpoint and restore for cloning and |
41 |
live migration of containers. |
42 |
|
43 |
%prep |
44 |
#%setup -q -n docker-%{commit} |
45 |
%setup -q -n %{repo}-%{version} |
46 |
# Fix /run paths - better than a moving patch file |
47 |
find . -path0 | xargs -0 perl -pi -e 's|/run/containerd|/run/docker/containerd|' |
48 |
|
49 |
%build |
50 |
#export DOCKER_GITCOMMIT="%{shortcommit}" |
51 |
#export DOCKER_GITCOMMIT="%{shortcommit}/%{version}" |
52 |
|
53 |
#ln -sf $(pwd) vendor/src/%{import_path} |
54 |
# build docker-containerd |
55 |
mv vendor src |
56 |
mkdir -p src/github.com/containerd |
57 |
ln -s $(pwd) src/github.com/containerd/containerd |
58 |
GOPATH=$(pwd) make |
59 |
|
60 |
%install |
61 |
# install binary |
62 |
install -d %{buildroot}%{_bindir} |
63 |
install -p -m 755 bin/* %{buildroot}%{_bindir} |
64 |
cd %{buildroot}%{_bindir} |
65 |
for i in *; do |
66 |
ln -sf $i docker-$i |
67 |
done |
68 |
|
69 |
%files |
70 |
%license LICENSE |
71 |
%doc NOTICE README.md PLUGINS.md RELEASES.md SCOPE.md ROADMAP.md |
72 |
%{_bindir}/* |