]>
Commit | Line | Data |
---|---|---|
a73bca1d ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
b2c07037 | 4 | |
f4565fa4 | 5 | Summary: Docker: the open-source application container engine |
47009a45 | 6 | Name: docker |
17f48a82 ER |
7 | Version: 1.6.2 |
8 | Release: 0.1 | |
b877f7b7 ER |
9 | License: Apache v2.0 |
10 | Group: Applications/System | |
f4565fa4 | 11 | Source0: https://github.com/docker/docker/archive/v%{version}/%{name}-%{version}.tar.gz |
17f48a82 | 12 | # Source0-md5: 81a1a015ec0520d739ec721f8295d94f |
c74634f7 | 13 | Source5: %{name}.service |
345101bd | 14 | Source6: %{name}.init |
62b620a7 | 15 | Source7: %{name}.sysconfig |
f4565fa4 | 16 | URL: https://github.com/docker/docker |
d17c4352 | 17 | BuildRequires: btrfs-progs-devel |
3d4f96d7 | 18 | BuildRequires: device-mapper-devel |
f4565fa4 | 19 | BuildRequires: golang >= 1.3.1 |
345101bd | 20 | BuildRequires: rpmbuild(macros) >= 1.228 |
678a84bd | 21 | BuildRequires: sqlite3-devel >= 3.7.9 |
d88043a2 ER |
22 | Requires(post,preun): /sbin/chkconfig |
23 | Requires(postun): /usr/sbin/groupdel | |
24 | Requires(pre): /usr/bin/getgid | |
25 | Requires(pre): /usr/sbin/groupadd | |
2e42e913 | 26 | Requires: iproute2 >= 3.5 |
b5920dfc | 27 | Requires: iptables |
345101bd | 28 | Requires: rc-scripts >= 0.4.0.10 |
2e42e913 | 29 | Requires: tar >= 1:1.26 |
2015cb19 | 30 | Requires: uname(release) >= 3.8 |
db150373 | 31 | Requires: xz |
2e42e913 | 32 | Suggests: git-core >= 1.7 |
46a6d8ab | 33 | Suggests: libcgroup |
2e42e913 | 34 | Suggests: xz >= 1:4.9 |
d88043a2 | 35 | Provides: group(docker) |
47009a45 ER |
36 | Obsoletes: lxc-docker < 1.1.1 |
37 | Patch0: lxc-%{name}-nosha.patch | |
d2670441 | 38 | # only runs on x64 hosts for now: |
f4565fa4 ER |
39 | # https://github.com/docker/docker/issues/136 |
40 | # https://github.com/docker/docker/issues/611 | |
345101bd | 41 | ExclusiveArch: %{x8664} |
b877f7b7 ER |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
8c352669 | 44 | %define bash_compdir %{_datadir}/bash-completion/completions |
f891ae41 | 45 | %define _vimdatadir %{_datadir}/vim |
8c352669 | 46 | |
434d66d3 ER |
47 | # binary stripped or something |
48 | %define _enable_debug_packages 0 | |
49 | ||
b877f7b7 | 50 | %description |
f4565fa4 ER |
51 | Docker is an open source project to pack, ship and run any application |
52 | as a lightweight container | |
53 | ||
54 | Docker containers are both hardware-agnostic and platform-agnostic. | |
55 | This means that they can run anywhere, from your laptop to the largest | |
56 | EC2 compute instance and everything in between - and they don't | |
57 | require that you use a particular language, framework or packaging | |
58 | system. That makes them great building blocks for deploying and | |
59 | scaling web apps, databases and backend services without depending on | |
60 | a particular stack or provider. | |
61 | ||
62 | Docker is an open-source implementation of the deployment engine which | |
63 | powers dotCloud, a popular Platform-as-a-Service. It benefits directly | |
64 | from the experience accumulated over several years of large-scale | |
65 | operation and support of hundreds of thousands of applications and | |
66 | databases. | |
b877f7b7 | 67 | |
f891ae41 | 68 | %package -n bash-completion-%{name} |
8c352669 ER |
69 | Summary: bash-completion for Docker |
70 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla Dockera | |
71 | Group: Applications/Shells | |
72 | Requires: %{name} | |
73 | Requires: bash-completion >= 2.0 | |
47009a45 | 74 | Obsoletes: bash-completion-lxc-docker < 1.1.1 |
8c352669 ER |
75 | %if "%{_rpmversion}" >= "5" |
76 | BuildArch: noarch | |
77 | %endif | |
78 | ||
47009a45 | 79 | %description -n bash-completion-%{name} |
8c352669 ER |
80 | This package provides bash-completion for Docker. |
81 | ||
47009a45 | 82 | %description -n bash-completion-%{name} -l pl.UTF-8 |
8c352669 ER |
83 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla Dockera. |
84 | ||
f891ae41 ER |
85 | %package -n vim-syntax-%{name} |
86 | Summary: Vim syntax: Docker | |
87 | Group: Applications/Editors/Vim | |
88 | Requires: %{name} = %{version}-%{release} | |
89 | Requires: vim-rt >= 4:7.2.170 | |
47009a45 | 90 | Obsoletes: vim-syntax-lxc-docker < 1.1.1 |
f891ae41 ER |
91 | %if "%{_rpmversion}" >= "5" |
92 | BuildArch: noarch | |
93 | %endif | |
94 | ||
95 | %description -n vim-syntax-%{name} | |
96 | This plugin provides syntax highlighting in Dockerfile. | |
97 | ||
b877f7b7 | 98 | %prep |
47009a45 | 99 | %setup -q |
98d3177c | 100 | %patch0 -p1 |
b877f7b7 | 101 | |
f4565fa4 ER |
102 | install -d vendor/src/github.com/docker |
103 | ln -s $(pwd) vendor/src/github.com/docker/docker | |
b877f7b7 | 104 | |
692548c0 ER |
105 | %build |
106 | export GOPATH=$(pwd)/vendor | |
e4252f76 ER |
107 | export DOCKER_GITCOMMIT="pld/%{version}" |
108 | ||
109 | DEBUG=1 hack/make.sh dynbinary | |
a73bca1d | 110 | |
b877f7b7 ER |
111 | %install |
112 | rm -rf $RPM_BUILD_ROOT | |
62b620a7 | 113 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/etc/{rc.d/init.d,sysconfig},%{systemdunitdir}} \ |
b73b275e | 114 | $RPM_BUILD_ROOT/var/lib/docker/{aufs,containers,execdriver,graph,init,tmp,trust,vfs,volumes} |
e4252f76 ER |
115 | |
116 | install -p bundles/%{version}/dynbinary/docker-%{version} $RPM_BUILD_ROOT%{_bindir}/docker | |
117 | install -p bundles/%{version}/dynbinary/dockerinit-%{version} $RPM_BUILD_ROOT%{_bindir}/dockerinit | |
118 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir} | |
47009a45 | 119 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/docker |
62b620a7 | 120 | cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/docker |
f891ae41 | 121 | #cp -p packaging/debian/lxc-docker.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
b877f7b7 | 122 | |
e4252f76 ER |
123 | # install udev rules |
124 | install -d $RPM_BUILD_ROOT/lib/udev/rules.d | |
125 | cp -p contrib/udev/80-docker.rules $RPM_BUILD_ROOT/lib/udev/rules.d | |
126 | ||
8c352669 ER |
127 | # bash completion |
128 | install -d $RPM_BUILD_ROOT%{bash_compdir} | |
47009a45 | 129 | cp -p contrib/completion/bash/docker $RPM_BUILD_ROOT%{bash_compdir}/docker |
8c352669 | 130 | |
f891ae41 ER |
131 | # vim syntax |
132 | install -d $RPM_BUILD_ROOT%{_vimdatadir} | |
7db50491 | 133 | cp -a contrib/syntax/vim/* $RPM_BUILD_ROOT%{_vimdatadir} |
f891ae41 ER |
134 | %{__rm} $RPM_BUILD_ROOT%{_vimdatadir}/{LICENSE,README.md} |
135 | ||
d88043a2 ER |
136 | %pre |
137 | %groupadd -g 296 docker | |
138 | ||
345101bd ER |
139 | %post |
140 | /sbin/chkconfig --add %{name} | |
141 | %service -n %{name} restart | |
142 | ||
143 | %preun | |
144 | if [ "$1" = "0" ]; then | |
145 | %service -q %{name} stop | |
146 | /sbin/chkconfig --del %{name} | |
147 | fi | |
148 | ||
d88043a2 ER |
149 | %postun |
150 | if [ "$1" = "0" ]; then | |
151 | %groupremove docker | |
152 | fi | |
153 | ||
b877f7b7 ER |
154 | %clean |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
157 | %files | |
158 | %defattr(644,root,root,755) | |
f4565fa4 | 159 | %doc README.md CHANGELOG.md CONTRIBUTING.md LICENSE AUTHORS NOTICE MAINTAINERS |
62b620a7 | 160 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/docker |
47009a45 | 161 | %attr(754,root,root) /etc/rc.d/init.d/docker |
9c77b76c | 162 | %attr(755,root,root) %{_bindir}/docker |
3d4f96d7 | 163 | %attr(755,root,root) %{_bindir}/dockerinit |
62b620a7 | 164 | %{systemdunitdir}/docker.service |
e4252f76 | 165 | /lib/udev/rules.d/80-docker.rules |
f891ae41 | 166 | #%{_mandir}/man1/lxc-docker.1* |
b73b275e | 167 | |
af991618 | 168 | %dir %attr(700,root,root) /var/lib/docker |
b73b275e | 169 | %dir %attr(700,root,root) /var/lib/docker/aufs |
af991618 | 170 | %dir %attr(700,root,root) /var/lib/docker/containers |
b73b275e | 171 | %dir %attr(700,root,root) /var/lib/docker/execdriver |
af991618 | 172 | %dir %attr(700,root,root) /var/lib/docker/graph |
b73b275e ER |
173 | %dir %attr(700,root,root) /var/lib/docker/init |
174 | %dir %attr(700,root,root) /var/lib/docker/tmp | |
175 | %dir %attr(700,root,root) /var/lib/docker/trust | |
176 | %dir %attr(700,root,root) /var/lib/docker/vfs | |
af991618 | 177 | %dir %attr(700,root,root) /var/lib/docker/volumes |
8c352669 | 178 | |
f891ae41 | 179 | %files -n bash-completion-%{name} |
8c352669 | 180 | %defattr(644,root,root,755) |
8c352669 | 181 | %{bash_compdir}/docker |
f891ae41 ER |
182 | |
183 | %files -n vim-syntax-%{name} | |
184 | %defattr(644,root,root,755) | |
7db50491 | 185 | %doc contrib/syntax/vim/{README.md,LICENSE} |
f891ae41 ER |
186 | %{_vimdatadir}/doc/dockerfile.txt |
187 | %{_vimdatadir}/ftdetect/dockerfile.vim | |
188 | %{_vimdatadir}/syntax/dockerfile.vim |