%global module lpod %global eggname %{module}_python %global pkgname python-%{module} Name: lpod-python Version: 1.1.5 Release: 1%{?dist} Summary: A python library implementing the OpenDocument Format standard License: GPLv3+ or ASL 2.0 URL: https://github.com/thorstenb/lpod-python Source: https://github.com/lpod/%{name}/archive/v%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-lxml BuildRequires: python-setuptools %description %{name} is the python implementation of the lpOD Project (Languages & Platforms OpenDocument, definition of a Free Software API implementing the ISO/IEC 26300 standard). %package -n %{pkgname} Summary: A python library implementing the OpenDocument Format standard Requires: python-lxml %description -n %{pkgname} %{pkgname} is the python implementation of the lpOD Project (Languages & Platforms OpenDocument, definition of a Free Software API implementing the ISO/IEC 26300 standard). %package -n %{pkgname}-tools Summary: Tools for manipulation of OpenDocument files using %{name} Requires: %{pkgname} %description -n %{pkgname}-tools %{pkgname}-tools contains tools for manipulation of OpenDocument files using %{name}. %prep %autosetup -n %{name}-%{version} # shebangs are only for scripts sed -i -e '1{/^#!/d}' lpod/cleaner.py lpod/rst2odt.py iconv -f MAC-CENTRALEUROPE -t utf-8 < README.md > out && mv out README.md %build %{__python2} setup.py build %install %{__python2} setup.py install --root %{buildroot} rm %{buildroot}%{_bindir}/lpod-budapest-demo.py %check cd test export PYTHONPATH=%{buildroot}%{python_sitelib} %{__python2} test.py %files -n %{pkgname} %doc apacheLICENSE-2.0.txt gpl-3.0.txt license.txt README README.md %{python_sitelib}/%{module}/ %{python_sitelib}/%{eggname}-%{version}-py2.?.egg-info %files -n %{pkgname}-tools %{_bindir}/lpod-clean.py %{_bindir}/lpod-convert.py %{_bindir}/lpod-diff.py %{_bindir}/lpod-folder.py %{_bindir}/lpod-highlight.py %{_bindir}/lpod-merge.py %{_bindir}/lpod-meta.py %{_bindir}/lpod-mm2odt.py %{_bindir}/lpod-show.py %{_bindir}/lpod-style.py %{_bindir}/lpod-test.py %changelog * Wed Mar 11 2015 David Tardon - 1.1.5-1 - initial import