#
# 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: 5
+Release: 6
License: LGPL v2.1+
Group: Applications/System
Source0: http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
# Source0-md5: 8552a4479090616f4bc04d8473765fc9
+Source1: %{name}-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
+Requires: which
Suggests: net-tools
+Suggests: rsync
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define configpath /var/lib/lxc
%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}
-
+install -d $RPM_BUILD_ROOT{%{configpath},/var/{cache,log}/lxc}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
pcdatadir=%{_pkgconfigdir}
%endif
%dir %{configpath}
-%dir /var/cache/lxc
+%dir %attr(750,root,root) /var/log/lxc
+%dir %attr(750,root,root) /var/cache/lxc
%files devel
%defattr(644,root,root,755)