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