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