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