%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define svnrev 33 %define svndate 20080929 %define module openoffice Name: python-%{module} Version: 0.1 Release: 0.1.%{svndate}svn%{svnrev}%{?dist} Summary: Python libraries for interacting with OpenOffice.org Group: Development/Languages License: GPLv3 URL: http://openoffice-python.origo.ethz.ch/ Source0: http://download.origo.ethz.ch/openoffice-python/807/%{module}-%{version}-r%{svnrev}-%{svndate}.tar.bz2 #Source1: http://download.origo.ethz.ch/openoffice-python/807/%{module}.interact-%{version}-r%{svnrev}-%{svndate}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel Requires: openoffice.org-pyuno %description The library is designed to supports both writing Macros called by OOo) and interacting with OOo from an external Python program (using the UNO bridge). %prep %setup -q -n %{module}-%{version}-r%{svnrev}-%{svndate} # remove exec perms for docs chmod a-x sample-scripts/* # remove the shebang line sed -i -e '1d' %{module}/streams.py sed -i -e '1d' %{module}/interact/__init__.py %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING LICENSE-gpl-3.0.txt README sample-scripts %{python_sitelib}/* %changelog * Tue Dec 2 2008 Dan HorĂ¡k 0.1-0.1.20080929svn33 - initial Fedora version