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