Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%define svnrev 34
%define svndate 20090228
%define module openoffice

Name:           python-%{module}
Version:        0.1
Release:        0.10.%{svndate}svn%{svnrev}%{?dist}
Summary:        Python libraries for interacting with LibreOffice
Group:          Development/Languages
License:        GPLv3
URL:            http://openoffice-python.origo.ethz.ch/
Source0:        http://download.origo.ethz.ch/openoffice-python/1034/%{module}-python-%{version}-r%{svnrev}-%{svndate}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
%if 0%{?rhel}
ExcludeArch:    ppc
%endif
BuildRequires:  python-devel

Requires:       libreoffice-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}-python-%{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.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
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.10.20090228svn34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.9.20090228svn34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.8.20090228svn34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Oct 30 2010 Caolán McNamara <caolanm@redhat.com> - 0.1-0.5.20090228svn34
- Rebuild for LibreOffice

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.1-0.6.20090228svn34
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Wed Aug 26 2009 Dan Horák <dan[at]danny.cz> 0.1-0.5.20090228svn34
- fixed Source0 URL

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.4.20090228svn34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Mar  6 2009 Dan Horák <dan[at]danny.cz> 0.1-0.3.20090228svn34
- check %%rhel for the ExcludeArch tag
- update to new upstream snapshot

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.2.20080929svn33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Dec 10 2008 Dan Horák <dan[at]danny.cz> 0.1-0.1.20080929svn33.1
- there is no openoffice.org in RHEL 5 on ppc

* Tue Dec  2 2008 Dan Horák <dan[at]danny.cz> 0.1-0.1.20080929svn33
- initial Fedora version