]>
Commit | Line | Data |
---|---|---|
a73bca1d ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
b2c07037 | 4 | |
b877f7b7 ER |
5 | Summary: Docker: the Linux container engine |
6 | Name: lxc-docker | |
b2c07037 | 7 | Version: 0.6.1 |
a30f3ec3 | 8 | Release: 1 |
b877f7b7 ER |
9 | License: Apache v2.0 |
10 | Group: Applications/System | |
11 | Source0: https://github.com/dotcloud/docker/archive/v%{version}.tar.gz | |
b2c07037 | 12 | # Source0-md5: 487262eae6627971e9181886d65fae1a |
3f5ee638 ER |
13 | Source100: https://raw.github.com/dotcloud/docker/v0.5.3/Makefile |
14 | # Source100-md5: 44cc86a37fc5dfe59596076d346da20d | |
a0edb644 ER |
15 | Source1: https://github.com/gorilla/context/archive/master.tar.gz?/gorilla-context.tgz |
16 | # Source1-md5: 621f599f7a49f56ca89c25a6d01ecc3a | |
17 | Source2: https://github.com/gorilla/mux/archive/master.tar.gz?/gorilla-mux.tgz | |
18 | # Source2-md5: e908c7da6b4b8b61b4733d4a348f015c | |
19 | Source3: https://github.com/kr/pty/archive/master.tar.gz?/kr-pty.tgz | |
b2c07037 | 20 | # Source3-md5: ffdcacc582c7b6404e71c2dce638869e |
3f5ee638 ER |
21 | Source4: https://github.com/dotcloud/tar/archive/master.tar.gz?/tar.tgz |
22 | # Source4-md5: 7458ecaa777e56d124b61638d597b37f | |
23 | # $ PKG=code.google.com/p/go.net/ REV=84a4013f96e0; hg clone http://$PKG go.net && cd go.net && hg checkout $REV && cd .. && tar -cjf go.net.tar.gz2 --exclude-vcs go.net | |
24 | Source5: go.net.tar.bz2 | |
25 | # Source5-md5: c8fd9d068430ddfa42d28d4772260eda | |
b877f7b7 | 26 | URL: http://github.com/dotcloud/docker |
cc7690e4 | 27 | BuildRequires: golang >= 1.1 |
b5920dfc | 28 | Requires: iptables |
2015cb19 ER |
29 | Requires: lxc |
30 | Requires: uname(release) >= 3.8 | |
b877f7b7 ER |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
8c352669 ER |
33 | %define bash_compdir %{_datadir}/bash-completion/completions |
34 | ||
434d66d3 ER |
35 | # binary stripped or something |
36 | %define _enable_debug_packages 0 | |
37 | ||
b877f7b7 ER |
38 | %description |
39 | Docker complements LXC with a high-level API which operates at the | |
40 | process level. It runs unix processes with strong guarantees of | |
41 | isolation and repeatability across servers. | |
42 | ||
43 | Docker is a great building block for automating distributed systems: | |
44 | large-scale web deployments, database clusters, continuous deployment | |
45 | systems, private PaaS, service-oriented architectures, etc. | |
46 | ||
8c352669 ER |
47 | %package -n bash-completion-lxc-docker |
48 | Summary: bash-completion for Docker | |
49 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla Dockera | |
50 | Group: Applications/Shells | |
51 | Requires: %{name} | |
52 | Requires: bash-completion >= 2.0 | |
53 | %if "%{_rpmversion}" >= "5" | |
54 | BuildArch: noarch | |
55 | %endif | |
56 | ||
57 | %description -n bash-completion-lxc-docker | |
58 | This package provides bash-completion for Docker. | |
59 | ||
60 | %description -n bash-completion-lxc-docker -l pl.UTF-8 | |
61 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla Dockera. | |
62 | ||
b877f7b7 | 63 | %prep |
3f5ee638 ER |
64 | %setup -q -n docker-%{version} -a1 -a2 -a3 -a4 -a5 |
65 | cp -p %{SOURCE100} . | |
a0edb644 | 66 | |
3f5ee638 ER |
67 | # handle external deps offline, these are taken from Dockerfile |
68 | install -d .gopath/src/github.com/{gorilla,kr,dotcloud} | |
a0edb644 ER |
69 | # git clone https://github.com/gorilla/context .gopath/src/github.com/gorilla/context |
70 | mv context-master .gopath/src/github.com/gorilla/context | |
71 | # git clone https://github.com/gorilla/mux .gopath/src/github.com/gorilla/mux | |
72 | mv mux-master .gopath/src/github.com/gorilla/mux | |
73 | # git clone https://github.com/kr/pty .gopath/src/github.com/kr/pty | |
74 | mv pty-master .gopath/src/github.com/kr/pty | |
3f5ee638 ER |
75 | # git clone https://github.com/dotcloud/tar .gopath/src/github.com/dotcloud/tar |
76 | mv tar-master .gopath/src/github.com/dotcloud/tar | |
77 | # PKG=code.google.com/p/go.net/ | |
78 | install -d .gopath/src/code.google.com/p | |
79 | mv go.net .gopath/src/code.google.com/p/go.net | |
b877f7b7 ER |
80 | |
81 | %build | |
a0edb644 ER |
82 | # avoid interfering with builder env |
83 | unset GIT_WORK_TREE | |
84 | unset GIT_DIR | |
b877f7b7 ER |
85 | %{__make} VERBOSE=1 |
86 | ||
a73bca1d ER |
87 | %if %{with tests} |
88 | %{__make} test | |
89 | %endif | |
90 | ||
b877f7b7 ER |
91 | %install |
92 | rm -rf $RPM_BUILD_ROOT | |
af991618 | 93 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/var/lib/docker/{containers,graph,volumes}} |
b877f7b7 | 94 | install -p bin/docker $RPM_BUILD_ROOT%{_bindir}/lxc-docker |
9c77b76c | 95 | ln -s lxc-docker $RPM_BUILD_ROOT%{_bindir}/docker |
b877f7b7 ER |
96 | cp -p packaging/debian/lxc-docker.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
97 | ||
8c352669 ER |
98 | # bash completion |
99 | install -d $RPM_BUILD_ROOT%{bash_compdir} | |
100 | cp -p contrib/docker.bash $RPM_BUILD_ROOT%{bash_compdir}/lxc-docker | |
101 | ln -s lxc-docker $RPM_BUILD_ROOT%{bash_compdir}/docker | |
102 | ||
b877f7b7 ER |
103 | %clean |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %files | |
107 | %defattr(644,root,root,755) | |
108 | %doc README.md CHANGELOG.md CONTRIBUTING.md FIXME LICENSE AUTHORS NOTICE MAINTAINERS | |
109 | %attr(755,root,root) %{_bindir}/lxc-docker | |
9c77b76c | 110 | %attr(755,root,root) %{_bindir}/docker |
b877f7b7 | 111 | %{_mandir}/man1/lxc-docker.1* |
af991618 ER |
112 | %dir %attr(700,root,root) /var/lib/docker |
113 | %dir %attr(700,root,root) /var/lib/docker/containers | |
114 | %dir %attr(700,root,root) /var/lib/docker/graph | |
115 | %dir %attr(700,root,root) /var/lib/docker/volumes | |
8c352669 ER |
116 | |
117 | %files -n bash-completion-lxc-docker | |
118 | %defattr(644,root,root,755) | |
119 | %{bash_compdir}/lxc-docker | |
120 | %{bash_compdir}/docker |