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