File chmviewkit.spec of Package chmviewkit
#
# spec file for package chmviewkit
#
# Copyright (c) 2018 SUSE LINUX 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/
#
Name: chmviewkit
Version: 0.2.2
Release: 0
Summary: Webkit/Gtk-based CHM Viewer
License: Waqf
Group: Productivity/Office/Other
URL: http://www.ojuba.org/wiki/news/14320714-chm-view-kit
Source0: http://git.ojuba.org/cgit/chmviewkit/snapshot/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE chmviewkit-0.2.2-install_prefix.patch lazy.kent@opensuse.org -- install files to prefix
Patch0: chmviewkit-0.2.2-install_prefix.patch
# PATCH-FEATURE-UPSTREAM chmviewkit-0.2.2-russian.patch lazy.kent@opensuse.org -- added Russian translation
Patch1: chmviewkit-0.2.2-russian.patch
BuildRequires: ImageMagick
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
%if 0%{?suse_version} && 0%{?suse_version} <= 1315
BuildRequires: python-setuptools
%else
BuildRequires: python2-setuptools
%endif
BuildRequires: update-desktop-files
Requires: python-gtk
Requires: python-webkitgtk
%if 0%{?suse_version} && 0%{?suse_version} <= 1315
Requires: python-Paste
Requires: python-pychm
%else
Requires: python2-Paste
Requires: python2-pychm
%endif
Recommends: %{name}-lang
BuildArch: noarch
%description
CHM View kit is a simple and fast CHM viewer.
%lang_package
%prep
%setup -q
%patch0
%patch1
%build
make
%install
%make_install PREFIX=%{_prefix}
%find_lang %{name}
%suse_update_desktop_file %{name}
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%license LICENSE-ar.txt LICENSE-en
%doc README AUTHORS
%{_bindir}/%{name}
%{python_sitelib}/%{name}*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/*/%{name}.*
%files lang -f %{name}.lang
%changelog