Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
DIST_SUBDIRS = config src templates doc
EXTRA_DIST = autogen.sh lxc.spec CONTRIBUTING MAINTAINERS ChangeLog
+if ENABLE_PYTHON
+RPMARGS = --with python
+endif
+
pcdatadir = $(libdir)/pkgconfig
pcdata_DATA = lxc.pc
@touch ChangeLog
rpm: dist
- rpmbuild --clean -ta ${distdir}.tar.gz
+ rpmbuild --clean -ta ${distdir}.tar.gz $(RPMARGS)
Requires: libcap openssl rsync
BuildRequires: libcap libcap-devel docbook2X
+%define with_python %{?_with_python: 1} %{?!_with_python: 0}
+%if %{with_python}
+Requires: python3
+BuildRequires: python3-devel
+%endif
+
%description
The package "%{name}" provides the command lines to create and manage
%prep
%setup
%build
-PATH=$PATH:/usr/sbin:/sbin %configure $args --disable-rpath
+PATH=$PATH:/usr/sbin:/sbin %configure $args \
+%if %{with_python}
+ --enable-python \
+%endif
+ --disable-rpath
make %{?_smp_mflags}
%install
%defattr(-,root,root)
%{_libdir}/*.so.*
%{_libdir}/%{name}
+%if %{with_python}
+%{_libdir}/python*
+%endif
%{_localstatedir}/*
%attr(4555,root,root) %{_libexecdir}/%{name}/lxc-init
lxc-destroy
if ENABLE_PYTHON
+ EXTRA_DIST = lxc-device lxc-ls
bin_SCRIPTS += lxc-device
bin_SCRIPTS += lxc-ls
bin_SCRIPTS += lxc-start-ephemeral
if ENABLE_PYTHON
+EXTRA_DIST = setup.py lxc.c
+
if HAVE_DEBIAN
DISTSETUPOPTS=--install-layout=deb
else
-EXTRA_DIST=lxc-ubuntu
-
templatesdir=@LXCTEMPLATEDIR@
templates_SCRIPTS = \