]> git.pld-linux.org Git - packages/lxc.git/blobdiff - lxc.spec
suggest net-tools, lxc-ps uses netstat(1)
[packages/lxc.git] / lxc.spec
index b8eacab86d889998b9a0b7f2c032767e20583b0d..b183931e9799533d7502a8b5e0a5b0dd8f18bbc6 100644 (file)
--- a/lxc.spec
+++ b/lxc.spec
@@ -1,17 +1,39 @@
+#
+# Conditional build:
+%bcond_without seccomp # SecComp syscall filter
+%bcond_without lua     # Lua binding
+%bcond_without python  # Python binding
+
 Summary:       Linux Container Tools
 Summary:       Linux Container Tools
+Summary(pl.UTF-8):     Narzędzia do kontenerów linuksowych (LXC)
 Name:          lxc
 Name:          lxc
-Version:       0.4.0
-Release:       1
-License:       GPL
-Group:         Base
-Source0:       http://dl.sourceforge.net/lxc/%{name}-%{version}.tar.gz
-# Source0-md5: 327f0e700858ab5b916aa36517680256
-URL:           http://sourceforge.net/projects/lxc
-BuildRequires: autoconf
+Version:       0.9.0
+Release:       2
+License:       LGPL v2.1+
+Group:         Applications/System
+Source0:       http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
+# Source0-md5: 8552a4479090616f4bc04d8473765fc9
+Patch0:                %{name}-devpts.patch
+Patch1:                %{name}-pld.patch
+URL:           http://lxc.sourceforge.net/
+BuildRequires: autoconf >= 2.50
 BuildRequires: automake
 BuildRequires: automake
-BuildRequires: libtool
+BuildRequires: docbook-dtd30-sgml
+BuildRequires: docbook-utils
+BuildRequires: docbook2X
+BuildRequires: libapparmor-devel
+BuildRequires: libcap-devel
+%{?with_seccomp:BuildRequires: libseccomp-devel}
+%{?with_lua:BuildRequires:     lua51-devel >= 5.1}
+BuildRequires: pkgconfig
+%{?with_python:BuildRequires:  python3-devel >= 3.2}
+BuildRequires: rpmbuild(macros) >= 1.612
+BuildRequires: sed >= 4.0
+Suggests:      net-tools
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                configpath      /var/lib/lxc
+
 %description
 Tools to create and manage containers. It contains a full featured
 container with the isolation / virtualization of the pids, the ipc,
 %description
 Tools to create and manage containers. It contains a full featured
 container with the isolation / virtualization of the pids, the ipc,
@@ -22,63 +44,198 @@ asynchronous events notification, or the freeze of the container. This
 package is useful to create Virtual Private Server, or to run isolated
 applications like bash or sshd.
 
 package is useful to create Virtual Private Server, or to run isolated
 applications like bash or sshd.
 
+%description -l pl.UTF-8
+Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje
+w pełni funkcjonalne kontenery z ilozacją/wirtualizacją pidów, ipc,
+utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające
+grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia
+do czynności związanych z kontenerami, takich jak monitorowanie z
+asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten
+pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych
+oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd.
+
 %package devel
 %package devel
-Summary:       Header files and develpment documentation for lxc
+Summary:       Header files for lxc library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki lxc
 Group:         Development/Libraries
 Group:         Development/Libraries
-Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      %{name} = %{version}-%{release}
 
 %description devel
 
 %description devel
-lxc development files.
+Header files for lxc library.
 
 
-%package static
-Summary:       Static lxc library
-Group:         Development/Libraries
-Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki lxc.
+
+%package -n lua-lxc
+Summary:       Lua binding for LXC
+Summary(pl.UTF-8):     Wiązanie Lua do LXC
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      lua51-libs >= 5.1
+
+%description -n lua-lxc
+Lua binding for LXC.
+
+%description -n lua-lxc -l pl.UTF-8
+Wiązanie Lua do LXC.
+
+%package -n python3-lxc
+Summary:       Python (3.x) binding for LXC
+Summary(pl.UTF-8):     Wiązanie Pythona (3.x) do LXC
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      python3-libs >= 3.2
 
 
-%description static
-Static lxc library.
+%description -n python3-lxc
+Python (3.x) binding for LXC.
+
+%description -n python3-lxc -l pl.UTF-8
+Wiązanie Pythona (3.x) do LXC.
 
 %prep
 %setup -q
 
 %prep
 %setup -q
-sed -i -e 's#^lxcpath=.*#lxcpath=/var/lxc#g' src/lxc/Makefile.am
+%patch0 -p1
+%patch1 -p1
 
 %build
 
 %build
-%{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I config
 %{__autoconf}
 %{__autoconf}
+%{__autoheader}
 %{__automake}
 %{__automake}
-%configure
+%configure \
+       db2xman=docbook2X2man \
+       --disable-rpath \
+       --enable-doc \
+       %{?with_lua:--enable-lua} \
+       %{?with_python:--enable-python} \
+       %{?with_seccomp:--enable-seccomp} \
+       --with-config-path=%{configpath} \
+       --with-distro=pld
 
 %{__make}
 
 %{__make}
+%{__make} -C doc
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       pcdatadir=%{_pkgconfigdir}
+
+%{__make} -C doc install \
        DESTDIR=$RPM_BUILD_ROOT
 
        DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT/var/lxc
+%{__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
+%endif
+%if %{with lua}
+%{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README etc/*.conf etc/*-config
-%attr(755,root,root) %{_bindir}/*
-%attr(755,root,root) %{_libdir}/liblxc-*.so
+%doc AUTHORS ChangeLog CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf
+%attr(755,root,root) %{_bindir}/lxc-attach
+%attr(755,root,root) %{_bindir}/lxc-cgroup
+%attr(755,root,root) %{_bindir}/lxc-checkconfig
+%attr(755,root,root) %{_bindir}/lxc-checkpoint
+%attr(755,root,root) %{_bindir}/lxc-clone
+%attr(755,root,root) %{_bindir}/lxc-console
+%attr(755,root,root) %{_bindir}/lxc-create
+%attr(755,root,root) %{_bindir}/lxc-destroy
+%attr(755,root,root) %{_bindir}/lxc-execute
+%attr(755,root,root) %{_bindir}/lxc-freeze
+%attr(755,root,root) %{_bindir}/lxc-info
+%attr(755,root,root) %{_bindir}/lxc-kill
+%attr(755,root,root) %{_bindir}/lxc-monitor
+%attr(755,root,root) %{_bindir}/lxc-netstat
+%attr(755,root,root) %{_bindir}/lxc-ps
+%attr(755,root,root) %{_bindir}/lxc-restart
+%attr(755,root,root) %{_bindir}/lxc-shutdown
+%attr(755,root,root) %{_bindir}/lxc-start
+%attr(755,root,root) %{_bindir}/lxc-stop
+%attr(755,root,root) %{_bindir}/lxc-unfreeze
+%attr(755,root,root) %{_bindir}/lxc-unshare
+%attr(755,root,root) %{_bindir}/lxc-version
+%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
 %dir %{_sysconfdir}/lxc
-%dir /var/lxc
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
+%{_datadir}/lxc
+%{_mandir}/man1/lxc-attach.1*
+%{_mandir}/man1/lxc-cgroup.1*
+%{_mandir}/man1/lxc-checkconfig.1*
+%{_mandir}/man1/lxc-checkpoint.1*
+%{_mandir}/man1/lxc-clone.1*
+%{_mandir}/man1/lxc-console.1*
+%{_mandir}/man1/lxc-create.1*
+%{_mandir}/man1/lxc-destroy.1*
+%{_mandir}/man1/lxc-execute.1*
+%{_mandir}/man1/lxc-freeze.1*
+%{_mandir}/man1/lxc-info.1*
+%{_mandir}/man1/lxc-kill.1*
+%{_mandir}/man1/lxc-monitor.1*
+%{_mandir}/man1/lxc-netstat.1*
+%{_mandir}/man1/lxc-ps.1*
+%{_mandir}/man1/lxc-restart.1*
+%{_mandir}/man1/lxc-shutdown.1*
+%{_mandir}/man1/lxc-start.1*
+%{_mandir}/man1/lxc-stop.1*
+%{_mandir}/man1/lxc-unfreeze.1*
+%{_mandir}/man1/lxc-unshare.1*
+%{_mandir}/man1/lxc-version.1*
+%{_mandir}/man1/lxc-wait.1*
+%{_mandir}/man5/lxc.conf.5*
+%{_mandir}/man7/lxc.7*
+%if %{without python}
+# legacy version
+%attr(755,root,root) %{_bindir}/lxc-ls
+%{_mandir}/man1/lxc-ls.1*
+%endif
 
 %files devel
 %defattr(644,root,root,755)
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/lxc
 %attr(755,root,root) %{_libdir}/liblxc.so
 %attr(755,root,root) %{_libdir}/liblxc.so
-%{_libdir}/lib*.la
+%{_includedir}/lxc
+%{_pkgconfigdir}/lxc.pc
 
 
-%files static
+%if %{with lua}
+%files -n lua-lxc
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/lxc-top
+%dir %{_libdir}/lua/5.1/lxc
+%attr(755,root,root) %{_libdir}/lua/5.1/lxc/core.so
+%{_datadir}/lua/5.1/lxc.lua
+%{_mandir}/man1/lxc-top.1*
+%endif
+
+%if %{with python}
+%files -n python3-lxc
 %defattr(644,root,root,755)
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%attr(755,root,root) %{_bindir}/lxc-device
+%attr(755,root,root) %{_bindir}/lxc-ls
+%attr(755,root,root) %{_bindir}/lxc-start-ephemeral
+%{py3_sitedir}/lxc
+%attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
+%{py3_sitedir}/_lxc-0.1-py*.egg-info
+%{_mandir}/man1/lxc-device.1*
+%{_mandir}/man1/lxc-ls.1*
+%{_mandir}/man1/lxc-start-ephemeral.1*
+%endif
This page took 0.029442 seconds and 4 git commands to generate.