use separate build directories
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
ee9b54e2b4
commit
8ea19b7e2d
20
libxml2.spec
20
libxml2.spec
@ -98,19 +98,20 @@ cp doc/*.py py3doc
|
|||||||
sed -i 's|#!/usr/bin/python |#!%{__python3} |' py3doc/*.py
|
sed -i 's|#!/usr/bin/python |#!%{__python3} |' py3doc/*.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
mkdir py2 py3
|
||||||
%make_build
|
%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 \{\} \;
|
find doc -type f -exec chmod 0644 \{\} \;
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -fr %{buildroot}
|
rm -fr %{buildroot}
|
||||||
|
|
||||||
%make_install
|
%make_install -C py2
|
||||||
|
%make_install -C py3
|
||||||
make clean
|
|
||||||
%configure --with-python=%{__python3}
|
|
||||||
%make_install
|
|
||||||
|
|
||||||
# multiarch crazyness on timestamp differences or Makefile/binaries for examples
|
# 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
|
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 -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-%{version}/*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{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
|
gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make runtests
|
%make_build runtests -C py2
|
||||||
|
%make_build runtests -C py3
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user