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