File xchm.spec of Package xchm

# spec file for package xchm
# 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

Name:           xchm
Version:        1.23
Release:        0
Summary:        CHM Viewer for UNIX
License:        GPL-2.0-or-later
Group:          Productivity/Office/Other
Source1:        %{name}.desktop
Source2:        %{name}.1
# PATCH-FIX-UPSTREAM xchm-1.23-russian.patch -- update and correct Russian translation
Patch0:         xchm-1.23-russian.patch
# PATCH-FIX-UPSTREAM xchm-wx3.0-compat.patch -- compile with wxWidgets 3.0
Patch1:         xchm-wx3.0-compat.patch
BuildRequires:  chmlib-devel
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  icoutils
BuildRequires:  update-desktop-files
BuildRequires:  wxWidgets-3_0-devel
Recommends:     %{name}-lang

xCHM is a cross-platform GUI front-end to chmlib, with borrowed bits
from Pabs' chmdeco project.
xCHM can show the content tree if one is available, print pages, change
font face and size, remember bookmarks, display a searchable index, and
search for words in the current page and the whole book.


%setup -q
%patch0 -p1
%patch1 -p1

# Update compiled locales.
pushd po
make update-gmo
make %{?_smp_mflags}

# Install man page.
install -Dm 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/%{name}.1
# Extract and install icons.
pushd rc
icotool -x xchm.ico
install -Dm 0644 xchm_1_16x16x8.png \
install -Dm 0644 xchm_2_32x32x8.png \
install -Dm 0644 xchm_3_48x48x8.png \
install -Dm 0644 xchm_4_128x128x8.png \
rm -rf %{buildroot}%{_datadir}/pixmaps
%find_lang %{name}
%suse_update_desktop_file -i %{name}



%license COPYING

%files lang -f %{name}.lang