#
# Conditional build:
%bcond_without seccomp # SecComp syscall filter
+%bcond_without apparmor # apparmor
%bcond_without lua # Lua binding
%bcond_without python # Python binding
Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC)
Name: lxc
Version: 0.9.0
-Release: 2
+Release: 5
License: LGPL v2.1+
Group: Applications/System
Source0: http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
# Source0-md5: 8552a4479090616f4bc04d8473765fc9
+Source1: lxc-pld.in.sh
Patch0: %{name}-devpts.patch
Patch1: %{name}-pld.patch
+Patch2: am-1.14.patch
+Patch3: checkconfig-module.patch
+Patch4: checkconfig-vserver-config.patch
+Patch5: fedora-template.patch
URL: http://lxc.sourceforge.net/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: docbook-dtd30-sgml
BuildRequires: docbook-utils
BuildRequires: docbook2X
-BuildRequires: libapparmor-devel
+%{?with_apparmor:BuildRequires: libapparmor-devel}
BuildRequires: libcap-devel
%{?with_seccomp:BuildRequires: libseccomp-devel}
%{?with_lua:BuildRequires: lua51-devel >= 5.1}
%{?with_python:BuildRequires: python3-devel >= 3.2}
BuildRequires: rpmbuild(macros) >= 1.612
BuildRequires: sed >= 4.0
+Requires: rc-scripts >= 0.4.6
Suggests: net-tools
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+
+cp -p %{SOURCE1} templates/lxc-pld.in
%build
%{__aclocal} -I config
db2xman=docbook2X2man \
--disable-rpath \
--enable-doc \
- %{?with_lua:--enable-lua} \
- %{?with_python:--enable-python} \
- %{?with_seccomp:--enable-seccomp} \
+ %{__enable_disable apparmor} \
+ %{__enable_disable lua} \
+ %{__enable_disable python} \
+ %{__enable_disable seccomp} \
--with-config-path=%{configpath} \
--with-distro=pld
%install
rm -rf $RPM_BUILD_ROOT
-
+install -d $RPM_BUILD_ROOT{%{configpath},/var/cache/lxc}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
pcdatadir=%{_pkgconfigdir}
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
-install -d $RPM_BUILD_ROOT%{configpath}
-
%if %{with python}
%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
%attr(755,root,root) %{_bindir}/lxc-wait
%attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/liblxc.so.0
-%dir %{configpath}
%dir %{_libdir}/lxc
%dir %{_libdir}/lxc/rootfs
%{_libdir}/lxc/rootfs/README
%attr(755,root,root) %{_libdir}/lxc/lxc-init
%dir %{_sysconfdir}/lxc
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
-%{_datadir}/lxc
+%dir %{_datadir}/lxc
+%{_datadir}/%{name}/lxc.functions
+%dir %{_datadir}/%{name}/hooks
+%dir %{_datadir}/%{name}/templates
+%attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
+%attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
%{_mandir}/man1/lxc-attach.1*
%{_mandir}/man1/lxc-cgroup.1*
%{_mandir}/man1/lxc-checkconfig.1*
%{_mandir}/man1/lxc-ls.1*
%endif
+%dir %{configpath}
+%dir /var/cache/lxc
+
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/liblxc.so