2011-09-19 08:33:45 +02:00
|
|
|
#
|
2011-10-23 09:49:44 +02:00
|
|
|
# spec file for package python-djvulibre
|
2011-09-19 08:33:45 +02:00
|
|
|
#
|
2015-08-16 07:07:23 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-10-23 09:49:44 +02:00
|
|
|
#
|
|
|
|
# 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/
|
2011-09-19 08:33:45 +02:00
|
|
|
#
|
|
|
|
|
2012-03-14 15:41:33 +01:00
|
|
|
|
2011-09-19 08:33:45 +02:00
|
|
|
Name: python-djvulibre
|
2015-08-31 20:48:56 +02:00
|
|
|
Version: 0.7
|
2011-09-19 08:33:45 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Python Support for the DjVu Image Format
|
2012-04-23 07:47:15 +02:00
|
|
|
License: GPL-2.0
|
2011-09-19 08:33:45 +02:00
|
|
|
Group: Development/Libraries/Python
|
2012-03-14 15:41:33 +01:00
|
|
|
Url: http://jwilk.net/software/python-djvulibre
|
2014-11-13 15:26:09 +01:00
|
|
|
Source0: http://pypi.python.org/packages/source/p/python-djvulibre/%{name}-%{version}.tar.gz
|
|
|
|
Source1: http://pypi.python.org/packages/source/p/python-djvulibre/%{name}-%{version}.tar.gz.asc
|
|
|
|
Source2: %{name}.keyring
|
2011-10-23 09:49:44 +02:00
|
|
|
BuildRequires: graphviz
|
|
|
|
BuildRequires: graphviz-gnome
|
2011-09-19 08:33:45 +02:00
|
|
|
BuildRequires: pkg-config
|
2015-08-16 07:07:23 +02:00
|
|
|
BuildRequires: python-Cython >= 0.19
|
2015-08-31 20:48:56 +02:00
|
|
|
BuildRequires: python-Sphinx
|
2015-08-16 07:07:23 +02:00
|
|
|
BuildRequires: python-devel >= 2.6
|
2013-10-24 13:04:41 +02:00
|
|
|
BuildRequires: python-setuptools
|
2015-08-16 07:07:23 +02:00
|
|
|
BuildRequires: pkgconfig(ddjvuapi) >= 3.5.21
|
2014-11-13 15:26:09 +01:00
|
|
|
# Required for tests.
|
|
|
|
BuildRequires: djvulibre
|
|
|
|
BuildRequires: python-nose
|
2015-08-16 07:07:23 +02:00
|
|
|
Requires: djvulibre >= 3.5.21
|
2011-10-23 09:49:44 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-09-19 08:33:45 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
python-djvulibre is a set of Python bindings for the DjVuLibre library,
|
|
|
|
an open source implementation of DjVu.
|
|
|
|
|
2011-10-23 09:49:44 +02:00
|
|
|
%package doc
|
|
|
|
Summary: Python Support for the DjVu Image Format (Documentation)
|
|
|
|
Group: Documentation/HTML
|
|
|
|
BuildArch: noarch
|
2011-09-19 08:33:45 +02:00
|
|
|
|
2011-10-23 09:49:44 +02:00
|
|
|
%description doc
|
|
|
|
python-djvulibre is a set of Python bindings for the DjVuLibre library,
|
|
|
|
an open source implementation of DjVu.
|
2011-09-19 08:33:45 +02:00
|
|
|
|
2011-10-23 09:49:44 +02:00
|
|
|
This package contains technical documentation.
|
2011-09-19 08:33:45 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2012-02-19 11:14:44 +01:00
|
|
|
chmod -x examples/*
|
2011-09-19 08:33:45 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
2011-10-23 09:49:44 +02:00
|
|
|
python setup.py build
|
|
|
|
python setup.py build_sphinx
|
2011-09-19 08:33:45 +02:00
|
|
|
|
|
|
|
%install
|
2011-10-23 09:49:44 +02:00
|
|
|
python setup.py install \
|
2011-11-24 20:01:18 +01:00
|
|
|
--root=%{buildroot} \
|
2014-11-13 15:26:09 +01:00
|
|
|
--prefix=%{_prefix}
|
|
|
|
install -dm 0755 %{buildroot}%{_defaultdocdir}/%{name}-doc/_images/
|
|
|
|
install -dm 0755 %{buildroot}%{_defaultdocdir}/%{name}-doc/_static/
|
2011-10-23 09:49:44 +02:00
|
|
|
install -m 0644 build/sphinx/html/{*.html,*.js} \
|
2014-11-13 15:26:09 +01:00
|
|
|
%{buildroot}%{_defaultdocdir}/%{name}-doc/
|
2011-10-23 09:49:44 +02:00
|
|
|
install -m 0644 build/sphinx/html/_images/* \
|
2014-11-13 15:26:09 +01:00
|
|
|
%{buildroot}%{_defaultdocdir}/%{name}-doc/_images/
|
2011-10-23 09:49:44 +02:00
|
|
|
install -m 0644 build/sphinx/html/_static/* \
|
2014-11-13 15:26:09 +01:00
|
|
|
%{buildroot}%{_defaultdocdir}/%{name}-doc/_static/
|
2011-09-19 08:33:45 +02:00
|
|
|
|
2014-11-13 15:26:09 +01:00
|
|
|
%check
|
|
|
|
cd tests/
|
|
|
|
ln -sf %{buildroot}%{python_sitearch}/djvu/ djvu
|
2015-08-16 07:07:23 +02:00
|
|
|
python -m nose --verbose
|
2014-11-13 15:26:09 +01:00
|
|
|
|
|
|
|
%files
|
2011-09-19 08:33:45 +02:00
|
|
|
%defattr(-,root,root,-)
|
2015-08-16 07:07:23 +02:00
|
|
|
%doc doc/{changelog,COPYING,credits.txt} examples/
|
2014-11-13 15:26:09 +01:00
|
|
|
%{python_sitearch}/*
|
2011-10-23 09:49:44 +02:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root,-)
|
2014-11-13 15:26:09 +01:00
|
|
|
%doc %{_defaultdocdir}/%{name}-doc/
|
2011-09-19 08:33:45 +02:00
|
|
|
|
|
|
|
%changelog
|