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