]>
Commit | Line | Data |
---|---|---|
67c70229 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without seccomp # SecComp syscall filter | |
4 | %bcond_without lua # Lua binding | |
5 | %bcond_without python # Python binding | |
6 | # | |
0886a606 | 7 | Summary: Linux Container Tools |
67c70229 | 8 | Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC) |
0886a606 | 9 | Name: lxc |
dc9a5b3b | 10 | Version: 0.9.0 |
a859d7b5 | 11 | Release: 1 |
c34ce688 | 12 | License: LGPL v2.1+ |
67c70229 | 13 | Group: Applications/System |
a859d7b5 AS |
14 | Source0: http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz |
15 | # Source0-md5: 8552a4479090616f4bc04d8473765fc9 | |
33aee790 | 16 | Patch0: %{name}-devpts.patch |
67c70229 JB |
17 | Patch1: %{name}-pld.patch |
18 | URL: http://lxc.sourceforge.net/ | |
19 | BuildRequires: autoconf >= 2.50 | |
20 | BuildRequires: automake | |
21 | BuildRequires: docbook2X | |
e5afa52e | 22 | BuildRequires: docbook-dtd30-sgml |
23 | BuildRequires: docbook-utils | |
67c70229 | 24 | BuildRequires: libapparmor-devel |
4e32c712 | 25 | BuildRequires: libcap-devel |
67c70229 JB |
26 | %{?with_seccomp:BuildRequires: libseccomp-devel} |
27 | %{?with_lua:BuildRequires: lua51-devel >= 5.1} | |
28 | BuildRequires: pkgconfig | |
29 | %{?with_python:BuildRequires: python3-devel >= 3.2} | |
30 | BuildRequires: rpmbuild(macros) >= 1.612 | |
c34ce688 | 31 | BuildRequires: sed >= 4.0 |
0886a606 AM |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
e5afa52e | 34 | %define configpath /var/lib/lxc |
35 | ||
0886a606 AM |
36 | %description |
37 | Tools to create and manage containers. It contains a full featured | |
38 | container with the isolation / virtualization of the pids, the ipc, | |
39 | the utsname, the mount points, /proc, /sys, the network and it takes | |
40 | into account the control groups. It is very light, flexible, and | |
41 | provides a set of tools around the container like the monitoring with | |
42 | asynchronous events notification, or the freeze of the container. This | |
43 | package is useful to create Virtual Private Server, or to run isolated | |
44 | applications like bash or sshd. | |
45 | ||
67c70229 JB |
46 | %description -l pl.UTF-8 |
47 | Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje | |
48 | w pełni funkcjonalne kontenery z ilozacją/wirtualizacją pidów, ipc, | |
49 | utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające | |
50 | grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia | |
51 | do czynności związanych z kontenerami, takich jak monitorowanie z | |
52 | asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten | |
53 | pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych | |
54 | oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd. | |
55 | ||
0886a606 | 56 | %package devel |
67c70229 JB |
57 | Summary: Header files for lxc library |
58 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki lxc | |
0886a606 | 59 | Group: Development/Libraries |
67c70229 | 60 | Requires: %{name} = %{version}-%{release} |
0886a606 AM |
61 | |
62 | %description devel | |
67c70229 JB |
63 | Header files for lxc library. |
64 | ||
65 | %description devel -l pl.UTF-8 | |
66 | Pliki nagłówkowe biblioteki lxc. | |
67 | ||
68 | %package -n lua-lxc | |
69 | Summary: Lua binding for LXC | |
70 | Summary(pl.UTF-8): Wiązanie Lua do LXC | |
71 | Group: Libraries | |
72 | Requires: %{name} = %{version}-%{release} | |
73 | Requires: lua51-libs >= 5.1 | |
74 | ||
75 | %description -n lua-lxc | |
76 | Lua binding for LXC. | |
77 | ||
78 | %description -n lua-lxc -l pl.UTF-8 | |
79 | Wiązanie Lua do LXC. | |
80 | ||
81 | %package -n python3-lxc | |
82 | Summary: Python (3.x) binding for LXC | |
83 | Summary(pl.UTF-8): Wiązanie Pythona (3.x) do LXC | |
84 | Group: Libraries | |
85 | Requires: %{name} = %{version}-%{release} | |
86 | Requires: python3-libs >= 3.2 | |
87 | ||
88 | %description -n python3-lxc | |
89 | Python (3.x) binding for LXC. | |
90 | ||
91 | %description -n python3-lxc -l pl.UTF-8 | |
92 | Wiązanie Pythona (3.x) do LXC. | |
0886a606 | 93 | |
0886a606 | 94 | %prep |
67c70229 | 95 | %setup -q |
33aee790 | 96 | %patch0 -p1 |
67c70229 | 97 | %patch1 -p1 |
0886a606 AM |
98 | |
99 | %build | |
67c70229 JB |
100 | %{__aclocal} -I config |
101 | %{__autoconf} | |
102 | %{__autoheader} | |
103 | %{__automake} | |
e5afa52e | 104 | %configure \ |
67c70229 JB |
105 | db2xman=docbook2X2man \ |
106 | --disable-rpath \ | |
107 | --enable-doc \ | |
108 | %{?with_lua:--enable-lua} \ | |
109 | %{?with_python:--enable-python} \ | |
110 | %{?with_seccomp:--enable-seccomp} \ | |
111 | --with-config-path=%{configpath} \ | |
112 | --with-distro=pld | |
0886a606 AM |
113 | |
114 | %{__make} | |
e5afa52e | 115 | %{__make} -C doc |
0886a606 AM |
116 | |
117 | %install | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %{__make} install \ | |
e5afa52e | 121 | DESTDIR=$RPM_BUILD_ROOT \ |
122 | pcdatadir=%{_pkgconfigdir} | |
33aee790 | 123 | |
e5afa52e | 124 | %{__make} -C doc install \ |
0886a606 | 125 | DESTDIR=$RPM_BUILD_ROOT |
33aee790 JR |
126 | |
127 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc | |
0886a606 | 128 | |
e5afa52e | 129 | install -d $RPM_BUILD_ROOT%{configpath} |
e2e45f68 | 130 | |
67c70229 JB |
131 | %if %{with python} |
132 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc | |
133 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc | |
134 | %endif | |
c34ce688 JB |
135 | %if %{with lua} |
136 | %{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top | |
137 | %endif | |
67c70229 | 138 | |
0886a606 AM |
139 | %clean |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | ||
67c70229 JB |
142 | %post -p /sbin/ldconfig |
143 | %postun -p /sbin/ldconfig | |
0886a606 AM |
144 | |
145 | %files | |
146 | %defattr(644,root,root,755) | |
dc9a5b3b | 147 | %doc AUTHORS ChangeLog CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf |
c34ce688 JB |
148 | %attr(755,root,root) %{_bindir}/lxc-attach |
149 | %attr(755,root,root) %{_bindir}/lxc-cgroup | |
150 | %attr(755,root,root) %{_bindir}/lxc-checkconfig | |
151 | %attr(755,root,root) %{_bindir}/lxc-checkpoint | |
152 | %attr(755,root,root) %{_bindir}/lxc-clone | |
153 | %attr(755,root,root) %{_bindir}/lxc-console | |
154 | %attr(755,root,root) %{_bindir}/lxc-create | |
155 | %attr(755,root,root) %{_bindir}/lxc-destroy | |
156 | %attr(755,root,root) %{_bindir}/lxc-execute | |
157 | %attr(755,root,root) %{_bindir}/lxc-freeze | |
158 | %attr(755,root,root) %{_bindir}/lxc-info | |
159 | %attr(755,root,root) %{_bindir}/lxc-kill | |
160 | %attr(755,root,root) %{_bindir}/lxc-monitor | |
161 | %attr(755,root,root) %{_bindir}/lxc-netstat | |
162 | %attr(755,root,root) %{_bindir}/lxc-ps | |
163 | %attr(755,root,root) %{_bindir}/lxc-restart | |
164 | %attr(755,root,root) %{_bindir}/lxc-shutdown | |
165 | %attr(755,root,root) %{_bindir}/lxc-start | |
166 | %attr(755,root,root) %{_bindir}/lxc-stop | |
167 | %attr(755,root,root) %{_bindir}/lxc-unfreeze | |
168 | %attr(755,root,root) %{_bindir}/lxc-unshare | |
169 | %attr(755,root,root) %{_bindir}/lxc-version | |
170 | %attr(755,root,root) %{_bindir}/lxc-wait | |
e5afa52e | 171 | %attr(755,root,root) %{_libdir}/liblxc.so.*.*.* |
172 | %attr(755,root,root) %ghost %{_libdir}/liblxc.so.0 | |
e5afa52e | 173 | %dir %{configpath} |
70f9d22b | 174 | %dir %{_libdir}/lxc |
70f9d22b | 175 | %dir %{_libdir}/lxc/rootfs |
67c70229 | 176 | %{_libdir}/lxc/rootfs/README |
70f9d22b | 177 | %attr(755,root,root) %{_libdir}/lxc/lxc-init |
dc9a5b3b | 178 | %dir %{_sysconfdir}/lxc |
67c70229 | 179 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf |
dc9a5b3b | 180 | %{_datadir}/lxc |
c34ce688 JB |
181 | %{_mandir}/man1/lxc-attach.1* |
182 | %{_mandir}/man1/lxc-cgroup.1* | |
183 | %{_mandir}/man1/lxc-checkconfig.1* | |
184 | %{_mandir}/man1/lxc-checkpoint.1* | |
185 | %{_mandir}/man1/lxc-clone.1* | |
186 | %{_mandir}/man1/lxc-console.1* | |
187 | %{_mandir}/man1/lxc-create.1* | |
188 | %{_mandir}/man1/lxc-destroy.1* | |
189 | %{_mandir}/man1/lxc-execute.1* | |
190 | %{_mandir}/man1/lxc-freeze.1* | |
191 | %{_mandir}/man1/lxc-info.1* | |
192 | %{_mandir}/man1/lxc-kill.1* | |
193 | %{_mandir}/man1/lxc-monitor.1* | |
194 | %{_mandir}/man1/lxc-netstat.1* | |
195 | %{_mandir}/man1/lxc-ps.1* | |
196 | %{_mandir}/man1/lxc-restart.1* | |
197 | %{_mandir}/man1/lxc-shutdown.1* | |
198 | %{_mandir}/man1/lxc-start.1* | |
199 | %{_mandir}/man1/lxc-stop.1* | |
200 | %{_mandir}/man1/lxc-unfreeze.1* | |
201 | %{_mandir}/man1/lxc-unshare.1* | |
202 | %{_mandir}/man1/lxc-version.1* | |
203 | %{_mandir}/man1/lxc-wait.1* | |
67c70229 JB |
204 | %{_mandir}/man5/lxc.conf.5* |
205 | %{_mandir}/man7/lxc.7* | |
c34ce688 JB |
206 | %if %{without python} |
207 | # legacy version | |
208 | %attr(755,root,root) %{_bindir}/lxc-ls | |
209 | %{_mandir}/man1/lxc-ls.1* | |
210 | %endif | |
0886a606 AM |
211 | |
212 | %files devel | |
213 | %defattr(644,root,root,755) | |
0886a606 | 214 | %attr(755,root,root) %{_libdir}/liblxc.so |
67c70229 | 215 | %{_includedir}/lxc |
e5afa52e | 216 | %{_pkgconfigdir}/lxc.pc |
67c70229 JB |
217 | |
218 | %if %{with lua} | |
219 | %files -n lua-lxc | |
220 | %defattr(644,root,root,755) | |
c34ce688 | 221 | %attr(755,root,root) %{_bindir}/lxc-top |
67c70229 JB |
222 | %dir %{_libdir}/lua/5.1/lxc |
223 | %attr(755,root,root) %{_libdir}/lua/5.1/lxc/core.so | |
224 | %{_datadir}/lua/5.1/lxc.lua | |
c34ce688 | 225 | %{_mandir}/man1/lxc-top.1* |
67c70229 JB |
226 | %endif |
227 | ||
228 | %if %{with python} | |
229 | %files -n python3-lxc | |
230 | %defattr(644,root,root,755) | |
c34ce688 JB |
231 | %attr(755,root,root) %{_bindir}/lxc-device |
232 | %attr(755,root,root) %{_bindir}/lxc-ls | |
233 | %attr(755,root,root) %{_bindir}/lxc-start-ephemeral | |
67c70229 JB |
234 | %{py3_sitedir}/lxc |
235 | %attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so | |
236 | %{py3_sitedir}/_lxc-0.1-py*.egg-info | |
c34ce688 JB |
237 | %{_mandir}/man1/lxc-device.1* |
238 | %{_mandir}/man1/lxc-ls.1* | |
239 | %{_mandir}/man1/lxc-start-ephemeral.1* | |
67c70229 | 240 | %endif |