%define module PyXML %define name python2.4-pyxml %define version 0.8.4 %define release %mkrel 9 %define py_platsitedir %{_libdir}/python2.4/site-packages Name: %{name} Version: %{version} Release: %{release} URL: http://%{name}.sourceforge.net/ Source0: http://prdownloads.sourceforge.net/pyxml/PyXML-%{version}.tar.bz2 License: Apacheish License Group: System/Libraries Summary: XML libraries for python BuildRequires: python2.4-devel BuildRequires: libexpat-devel BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot Obsoletes: %{module} Provides: %{module} #gw we need full python Requires: python2.4 %description An XML package for Python. The distribution contains a validating XML parser, an implementation of the SAX and DOM programming interfaces and an interface to the Expat parser. %prep %setup -q -n %{module}-%{version} for file in scripts/*; do sed 's,#!/usr/bin/python,#!/usr/bin/python2.4,' ${file} > ${file}2.4 rm ${file} done perl -p -i -e "s,scripts/[^']+,$&2.4,g" setup.py %build CFLAGS="$RPM_OPT_FLAGS" python2.4 setup.py build --with-libexpat=%_prefix %install rm -fr $RPM_BUILD_ROOT python2.4 setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES %clean rm -rf $RPM_BUILD_ROOT %files -f INSTALLED_FILES %defattr(-,root,root) %doc LICENCE ANNOUNCE CREDITS README README.dom README.pyexpat README.sgmlop TODO doc/* %changelog * Sun Sep 9 2007 Kazuhiko Shiozaki 0.8.4-9mdv2007.1 - add '2.4' suffix to /usr/bin/* * Sat Jun 30 2007 Jean-Paul Smets 0.8.4-8mdv2007.1 - Make py_platsitedir based on generic _libdir * Tue Nov 28 2006 Götz Waschk 0.8.4-7mdv2007.0 + Revision: 88167 - Import python-pyxml * Tue Nov 28 2006 Götz Waschk 0.8.4-7mdv2007.1 - update file list * Wed Feb 01 2006 Michael Scherer 0.8.4-6mdk - really fix file listing for amd64 * Mon Jan 30 2006 Michael Scherer 0.8.4-5mdk - fix file listing, and no longer ship .pyo * Tue Jan 17 2006 Götz Waschk 0.8.4-4mdk - depend on python * Sun Jan 01 2006 Mandriva Linux Team 0.8.4-3mdk - Rebuild * Wed May 4 2005 Götz Waschk 0.8.4-2mdk - use external libexpat - enable xpath and xslt * Thu Dec 16 2004 Guillaume Rousse 0.8.4-1mdk - new version - changed name * Sun Dec 05 2004 Michael Scherer 0.8.3-4mdk - Rebuild for new python * Mon Nov 01 2004 Michael Scherer 0.8.3-3mdk - [DIRM] * Sat Apr 10 2004 Michael Scherer 0.8.3-2mdk - [DIRM] * Wed Aug 20 2003 Austin Acton 0.8.3-1mdk - 0.8.3 * Tue Aug 12 2003 Per Øyvind Karlsen 0.8.2-4mdk - rebuild for new python * Sat Mar 29 2003 David Walluck 0.8.2-3mdk - release * Tue Mar 25 2003 David Walluck 0.8.2-2plf - spec file cleanups * Sun Jan 26 2003 David Walluck 0.8.2-1plf - release