]> git.pld-linux.org Git - packages/docker.git/blame - lxc-docker.spec
update runtime deps from docs
[packages/docker.git] / lxc-docker.spec
CommitLineData
a73bca1d
ER
1#
2# Conditional build:
3%bcond_with tests # build without tests
b2c07037 4
b877f7b7
ER
5Summary: Docker: the Linux container engine
6Name: lxc-docker
f891ae41
ER
7Version: 0.6.4
8Release: 1
b877f7b7
ER
9License: Apache v2.0
10Group: Applications/System
c69d20bf 11Source0: https://github.com/dotcloud/docker/archive/v%{version}/docker-%{version}.tar.gz
f891ae41 12# Source0-md5: c70bb4f56ef1fee069964a5f8c7c26f9
345101bd 13Source6: %{name}.init
b877f7b7 14URL: http://github.com/dotcloud/docker
c69d20bf 15BuildRequires: golang >= 1.1.2
345101bd 16BuildRequires: rpmbuild(macros) >= 1.228
d88043a2
ER
17Requires(post,preun): /sbin/chkconfig
18Requires(postun): /usr/sbin/groupdel
19Requires(pre): /usr/bin/getgid
20Requires(pre): /usr/sbin/groupadd
2e42e913 21Requires: iproute2 >= 3.5
b5920dfc 22Requires: iptables
2e42e913 23Requires: lxc >= 0.8
345101bd 24Requires: rc-scripts >= 0.4.0.10
2e42e913 25Requires: tar >= 1:1.26
2015cb19 26Requires: uname(release) >= 3.8
db150373 27Requires: xz
2e42e913 28Suggests: git-core >= 1.7
46a6d8ab 29Suggests: libcgroup
2e42e913 30Suggests: xz >= 1:4.9
d88043a2 31Provides: group(docker)
d2670441
ER
32# only runs on x64 hosts for now:
33# https://github.com/dotcloud/docker/issues/136
34# https://github.com/dotcloud/docker/issues/611
345101bd 35ExclusiveArch: %{x8664}
b877f7b7
ER
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
8c352669 38%define bash_compdir %{_datadir}/bash-completion/completions
f891ae41 39%define _vimdatadir %{_datadir}/vim
8c352669 40
434d66d3
ER
41# binary stripped or something
42%define _enable_debug_packages 0
43
b877f7b7
ER
44%description
45Docker complements LXC with a high-level API which operates at the
46process level. It runs unix processes with strong guarantees of
47isolation and repeatability across servers.
48
49Docker is a great building block for automating distributed systems:
50large-scale web deployments, database clusters, continuous deployment
51systems, private PaaS, service-oriented architectures, etc.
52
f891ae41 53%package -n bash-completion-%{name}
8c352669
ER
54Summary: bash-completion for Docker
55Summary(pl.UTF-8): bashowe uzupełnianie nazw dla Dockera
56Group: Applications/Shells
57Requires: %{name}
58Requires: bash-completion >= 2.0
59%if "%{_rpmversion}" >= "5"
60BuildArch: noarch
61%endif
62
63%description -n bash-completion-lxc-docker
64This package provides bash-completion for Docker.
65
66%description -n bash-completion-lxc-docker -l pl.UTF-8
67Pakiet ten dostarcza bashowe uzupełnianie nazw dla Dockera.
68
f891ae41
ER
69%package -n vim-syntax-%{name}
70Summary: Vim syntax: Docker
71Group: Applications/Editors/Vim
72Requires: %{name} = %{version}-%{release}
73Requires: vim-rt >= 4:7.2.170
74%if "%{_rpmversion}" >= "5"
75BuildArch: noarch
76%endif
77
78%description -n vim-syntax-%{name}
79This plugin provides syntax highlighting in Dockerfile.
80
b877f7b7 81%prep
c69d20bf 82%setup -q -n docker-%{version}
b877f7b7 83
692548c0
ER
84install -d vendor/src/github.com/dotcloud
85ln -s $(pwd) vendor/src/github.com/dotcloud/docker
b877f7b7 86
692548c0
ER
87%build
88export GOPATH=$(pwd)/vendor
89install -d build
90cd build
3c4fee36 91VERSION=%{version}
e791dbbd 92GITCOMMIT=pld-%{release} # use RPM_PACKAGE_RELEASE for this
3c4fee36
ER
93# Use these flags when compiling the tests and final binary
94# without '-d', as that fails now
95LDFLAGS="-X main.GITCOMMIT $GITCOMMIT -X main.VERSION $VERSION -w"
96go build -v -ldflags "$LDFLAGS" -a github.com/dotcloud/docker/docker
a73bca1d 97
b877f7b7
ER
98%install
99rm -rf $RPM_BUILD_ROOT
345101bd 100install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/etc/rc.d/init.d,/var/lib/docker/{containers,graph,volumes}}
692548c0 101install -p build/docker $RPM_BUILD_ROOT%{_bindir}/lxc-docker
345101bd 102install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc-docker
9c77b76c 103ln -s lxc-docker $RPM_BUILD_ROOT%{_bindir}/docker
f891ae41 104#cp -p packaging/debian/lxc-docker.1 $RPM_BUILD_ROOT%{_mandir}/man1
b877f7b7 105
8c352669
ER
106# bash completion
107install -d $RPM_BUILD_ROOT%{bash_compdir}
f891ae41 108cp -p contrib/completion/bash/docker $RPM_BUILD_ROOT%{bash_compdir}/lxc-docker
8c352669
ER
109ln -s lxc-docker $RPM_BUILD_ROOT%{bash_compdir}/docker
110
f891ae41
ER
111# vim syntax
112install -d $RPM_BUILD_ROOT%{_vimdatadir}
113cp -a contrib/vim-syntax/* $RPM_BUILD_ROOT%{_vimdatadir}
114%{__rm} $RPM_BUILD_ROOT%{_vimdatadir}/{LICENSE,README.md}
115
d88043a2
ER
116%pre
117%groupadd -g 296 docker
118
345101bd
ER
119%post
120/sbin/chkconfig --add %{name}
121%service -n %{name} restart
122
123%preun
124if [ "$1" = "0" ]; then
125 %service -q %{name} stop
126 /sbin/chkconfig --del %{name}
127fi
128
d88043a2
ER
129%postun
130if [ "$1" = "0" ]; then
131 %groupremove docker
132fi
133
b877f7b7
ER
134%clean
135rm -rf $RPM_BUILD_ROOT
136
137%files
138%defattr(644,root,root,755)
139%doc README.md CHANGELOG.md CONTRIBUTING.md FIXME LICENSE AUTHORS NOTICE MAINTAINERS
345101bd 140%attr(754,root,root) /etc/rc.d/init.d/lxc-docker
b877f7b7 141%attr(755,root,root) %{_bindir}/lxc-docker
9c77b76c 142%attr(755,root,root) %{_bindir}/docker
f891ae41 143#%{_mandir}/man1/lxc-docker.1*
af991618
ER
144%dir %attr(700,root,root) /var/lib/docker
145%dir %attr(700,root,root) /var/lib/docker/containers
146%dir %attr(700,root,root) /var/lib/docker/graph
147%dir %attr(700,root,root) /var/lib/docker/volumes
8c352669 148
f891ae41 149%files -n bash-completion-%{name}
8c352669
ER
150%defattr(644,root,root,755)
151%{bash_compdir}/lxc-docker
152%{bash_compdir}/docker
f891ae41
ER
153
154%files -n vim-syntax-%{name}
155%defattr(644,root,root,755)
156%doc contrib/vim-syntax/{README.md,LICENSE}
157%{_vimdatadir}/doc/dockerfile.txt
158%{_vimdatadir}/ftdetect/dockerfile.vim
159%{_vimdatadir}/syntax/dockerfile.vim
This page took 0.081207 seconds and 4 git commands to generate.