[lxc-devel] [PATCH] include python files in make dist and rpm

Stéphane Graber stgraber at ubuntu.com
Wed Jan 23 23:05:04 UTC 2013


On 01/23/2013 12:59 PM, Dwight Engen wrote:
> Signed-off-by: Dwight Engen <dwight.engen at oracle.com>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

Pushed to staging. Thanks

> ---
>  Makefile.am                |  6 +++++-
>  lxc.spec.in                | 15 ++++++++++++++-
>  src/lxc/Makefile.am        |  1 +
>  src/python-lxc/Makefile.am |  2 ++
>  4 files changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 7b32326..3fb453e 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -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)
> diff --git a/lxc.spec.in b/lxc.spec.in
> index c7470b8..65997d9 100644
> --- a/lxc.spec.in
> +++ b/lxc.spec.in
> @@ -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
>  
> diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
> index 8b40926..e78281b 100644
> --- a/src/lxc/Makefile.am
> +++ b/src/lxc/Makefile.am
> @@ -126,6 +126,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
> diff --git a/src/python-lxc/Makefile.am b/src/python-lxc/Makefile.am
> index 9d775c3..d62b2b0 100644
> --- a/src/python-lxc/Makefile.am
> +++ b/src/python-lxc/Makefile.am
> @@ -1,5 +1,7 @@
>  if ENABLE_PYTHON
>  
> +EXTRA_DIST=setup.py lxc.c
> +
>  if HAVE_DEBIAN
>      DISTSETUPOPTS=--install-layout=deb
>  else
> 


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130123/b651c6f7/attachment.pgp>


More information about the lxc-devel mailing list