]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
include python files in make dist and rpm
authorDwight Engen <dwight.engen@oracle.com>
Wed, 23 Jan 2013 17:59:21 +0000 (12:59 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 23 Jan 2013 22:30:07 +0000 (17:30 -0500)
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Makefile.am
lxc.spec.in
src/lxc/Makefile.am
src/python-lxc/Makefile.am
templates/Makefile.am

index 7b3232646bf7ba6295afdc43f4d5ca08ffee1fb8..3fb453e3dc8026cbfc5371f42c150e3c2eab1245 100644 (file)
@@ -6,6 +6,10 @@ SUBDIRS = config src templates doc
 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
 
@@ -17,4 +21,4 @@ ChangeLog::
        @touch ChangeLog
 
 rpm: dist
-       rpmbuild --clean -ta ${distdir}.tar.gz
+       rpmbuild --clean -ta ${distdir}.tar.gz $(RPMARGS)
index c7470b855d2cf07eeb01c5f3295f07bbaf92da64..65997d9fd07d7f935b6b1f47b370ae4c7c8efd12 100644 (file)
@@ -32,6 +32,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
 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
@@ -62,7 +68,11 @@ development of the linux containers.
 %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
@@ -97,6 +107,9 @@ rm -rf %{buildroot}
 %defattr(-,root,root)
 %{_libdir}/*.so.*
 %{_libdir}/%{name}
+%if %{with_python}
+%{_libdir}/python*
+%endif
 %{_localstatedir}/*
 %attr(4555,root,root) %{_libexecdir}/%{name}/lxc-init
 
index 5a28af4c999ec7ad63185deb55dc5d5cfd63dc80..b55a20c54cfebfd2fa3955fc56b3d90b41a9890a 100644 (file)
@@ -125,6 +125,7 @@ bin_SCRIPTS = \
        lxc-destroy
 
 if ENABLE_PYTHON
+    EXTRA_DIST = lxc-device lxc-ls
     bin_SCRIPTS += lxc-device
     bin_SCRIPTS += lxc-ls
     bin_SCRIPTS += lxc-start-ephemeral
index 9d775c3ec242ddb8636874f8eb843c17410fd2cf..52ede07012dea721397ab539266d35560024244a 100644 (file)
@@ -1,5 +1,7 @@
 if ENABLE_PYTHON
 
+EXTRA_DIST = setup.py lxc.c
+
 if HAVE_DEBIAN
     DISTSETUPOPTS=--install-layout=deb
 else
index be7e9f6e72c70f383436d2af9877fb04934c6841..67b099c6631d1d4debe24d6c4951d823249e2586 100644 (file)
@@ -1,5 +1,3 @@
-EXTRA_DIST=lxc-ubuntu
-
 templatesdir=@LXCTEMPLATEDIR@
 
 templates_SCRIPTS = \