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