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