python-odfpy/python-odfpy.spec

67 lines
2.2 KiB
RPMSpec

#
# spec file for package python-odfpy
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%define real_name odfpy
#
#
Name: python-%{real_name}
Group: Development/Libraries/Python
Version: 0.9.2
Release: 1
License: dual license(GPLv2+ | ASLv2.0)
Summary: Tools and Python API for manipulating OASIS ODF documents
AutoReqProv: on
Source: %{real_name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl python python-setuptools
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
Url: http://opendocumentfellowship.com/projects/odfpy
# Packager: Ciaran Farrell <cfarrell1980@googlemail.com>
%{py_requires}
%description
odfpy aims to be a complete API for OpenDocument in Python. Unlike other more
convenient APIs, this one is essentially an abstraction layer just above the
XML format. The main focus has been to prevent the programmer from creating
invalid documents. It has checks that raise an exception if the programmer
adds an invalid element, adds an attribute unknown to the grammar, forgets
to add a required attribute or adds text to an element that doesn't allow it.
%prep
%setup -n %{real_name}-%{version}
%build
export CFLAGS="$RPM_OPT_FLAGS"
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
perl -p -i -e 's|(.*/man/.*)|${1}*|g' INSTALLED_FILES
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)
%changelog