3 %bcond_with tests # build without tests
5 Summary: Docker: the Linux container engine
10 Group: Applications/System
11 Source0: https://github.com/dotcloud/docker/archive/v%{version}/docker-%{version}.tar.gz
12 # Source0-md5: 41df68b4b4f1e03ab1d0964f4b73f440
13 Source100: https://raw.github.com/dotcloud/docker/v0.5.3/Makefile
14 # Source100-md5: 44cc86a37fc5dfe59596076d346da20d
16 URL: http://github.com/dotcloud/docker
17 BuildRequires: golang >= 1.1.2
18 BuildRequires: rpmbuild(macros) >= 1.228
19 Requires(post,preun): /sbin/chkconfig
20 Requires(postun): /usr/sbin/groupdel
21 Requires(pre): /usr/bin/getgid
22 Requires(pre): /usr/sbin/groupadd
25 Requires: rc-scripts >= 0.4.0.10
27 Requires: uname(release) >= 3.8
29 Provides: group(docker)
30 # only runs on x64 hosts for now:
31 # https://github.com/dotcloud/docker/issues/136
32 # https://github.com/dotcloud/docker/issues/611
33 ExclusiveArch: %{x8664}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define bash_compdir %{_datadir}/bash-completion/completions
38 # binary stripped or something
39 %define _enable_debug_packages 0
42 Docker complements LXC with a high-level API which operates at the
43 process level. It runs unix processes with strong guarantees of
44 isolation and repeatability across servers.
46 Docker is a great building block for automating distributed systems:
47 large-scale web deployments, database clusters, continuous deployment
48 systems, private PaaS, service-oriented architectures, etc.
50 %package -n bash-completion-lxc-docker
51 Summary: bash-completion for Docker
52 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla Dockera
53 Group: Applications/Shells
55 Requires: bash-completion >= 2.0
56 %if "%{_rpmversion}" >= "5"
60 %description -n bash-completion-lxc-docker
61 This package provides bash-completion for Docker.
63 %description -n bash-completion-lxc-docker -l pl.UTF-8
64 Pakiet ten dostarcza bashowe uzupełnianie nazw dla Dockera.
67 %setup -q -n docker-%{version}
71 # avoid interfering with builder env
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/etc/rc.d/init.d,/var/lib/docker/{containers,graph,volumes}}
83 install -p bin/docker $RPM_BUILD_ROOT%{_bindir}/lxc-docker
84 install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc-docker
85 ln -s lxc-docker $RPM_BUILD_ROOT%{_bindir}/docker
86 cp -p packaging/debian/lxc-docker.1 $RPM_BUILD_ROOT%{_mandir}/man1
89 install -d $RPM_BUILD_ROOT%{bash_compdir}
90 cp -p contrib/docker.bash $RPM_BUILD_ROOT%{bash_compdir}/lxc-docker
91 ln -s lxc-docker $RPM_BUILD_ROOT%{bash_compdir}/docker
94 %groupadd -g 296 docker
97 /sbin/chkconfig --add %{name}
98 %service -n %{name} restart
101 if [ "$1" = "0" ]; then
102 %service -q %{name} stop
103 /sbin/chkconfig --del %{name}
107 if [ "$1" = "0" ]; then
112 rm -rf $RPM_BUILD_ROOT
115 %defattr(644,root,root,755)
116 %doc README.md CHANGELOG.md CONTRIBUTING.md FIXME LICENSE AUTHORS NOTICE MAINTAINERS
117 %attr(754,root,root) /etc/rc.d/init.d/lxc-docker
118 %attr(755,root,root) %{_bindir}/lxc-docker
119 %attr(755,root,root) %{_bindir}/docker
120 %{_mandir}/man1/lxc-docker.1*
121 %dir %attr(700,root,root) /var/lib/docker
122 %dir %attr(700,root,root) /var/lib/docker/containers
123 %dir %attr(700,root,root) /var/lib/docker/graph
124 %dir %attr(700,root,root) /var/lib/docker/volumes
126 %files -n bash-completion-lxc-docker
127 %defattr(644,root,root,755)
128 %{bash_compdir}/lxc-docker
129 %{bash_compdir}/docker