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