]> git.pld-linux.org Git - packages/lxc.git/blobdiff - lxc.spec
generate templates/lxc-pld
[packages/lxc.git] / lxc.spec
index b183931e9799533d7502a8b5e0a5b0dd8f18bbc6..975099d9265ef5480ba070f65346f7b5b9ba9fe1 100644 (file)
--- a/lxc.spec
+++ b/lxc.spec
@@ -1,6 +1,7 @@
 #
 # Conditional build:
 %bcond_without seccomp # SecComp syscall filter
+%bcond_without apparmor        # apparmor
 %bcond_without lua     # Lua binding
 %bcond_without python  # Python binding
 
@@ -8,20 +9,25 @@ Summary:      Linux Container Tools
 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}
@@ -29,6 +35,7 @@ BuildRequires:        pkgconfig
 %{?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)
 
@@ -96,6 +103,12 @@ Wiązanie Pythona (3.x) do LXC.
 %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
@@ -106,9 +119,10 @@ Wiązanie Pythona (3.x) do LXC.
        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
 
@@ -117,7 +131,7 @@ Wiązanie Pythona (3.x) do LXC.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
+install -d $RPM_BUILD_ROOT{%{configpath},/var/cache/lxc}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
        pcdatadir=%{_pkgconfigdir}
@@ -127,8 +141,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %{__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
@@ -171,14 +183,18 @@ rm -rf $RPM_BUILD_ROOT
 %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*
@@ -210,6 +226,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_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
This page took 0.070574 seconds and 4 git commands to generate.