From 8ea19b7e2d9598431e4e4c05438ef09e87856287 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 24 Jan 2018 07:00:54 +0100 Subject: [PATCH] use separate build directories Signed-off-by: Igor Gnatenko --- libxml2.spec | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/libxml2.spec b/libxml2.spec index 1d94460..53cacbe 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -98,19 +98,20 @@ cp doc/*.py py3doc sed -i 's|#!/usr/bin/python |#!%{__python3} |' py3doc/*.py %build -%configure -%make_build +mkdir py2 py3 +%global _configure ../configure +( cd py2 && %configure --cache-file=../config.cache --with-python=%{__python2} ) +( cd py3 && %configure --cache-file=../config.cache --with-python=%{__python3} ) +%make_build -C py2 +%make_build -C py3 find doc -type f -exec chmod 0644 \{\} \; %install rm -fr %{buildroot} -%make_install - -make clean -%configure --with-python=%{__python3} -%make_install +%make_install -C py2 +%make_install -C py3 # multiarch crazyness on timestamp differences or Makefile/binaries for examples touch -m --reference=$RPM_BUILD_ROOT/%{_includedir}/libxml2/libxml/parser.h $RPM_BUILD_ROOT/%{_bindir}/xml2-config @@ -120,11 +121,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/* rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/* -(cd doc/examples ; make clean ; rm -rf .deps Makefile) +#(cd doc/examples ; make clean ; rm -rf .deps Makefile) gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz %check -make runtests +%make_build runtests -C py2 +%make_build runtests -C py3 %post -p /sbin/ldconfig