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