File kchmviewer.spec of Package kchmviewer4
#
# spec file for package kchmviewer
#
# Copyright (c) 2016 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: kchmviewer
BuildRequires: chmlib-devel
BuildRequires: libkde4-devel
BuildRequires: pkgconfig(libzip)
Summary: KDE CHM Viewer
License: GPL-3.0
Group: Productivity/Office/Other
Version: 7.7
Release: 0
Url: http://www.kchmviewer.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: http://downloads.sourceforge.net/%name/%version/%name-%version.tar.gz
%kde4_runtime_requires
%description
This is a viewer for the CHM files which are used for end user
documentation (MS Windows Compressed HTML Documents). It supports
complex searching for large books and has various viewing features.
%prep
%setup -q
# add missing libX11 to the link libraries to fix build
sed -i '/TARGET_LINK_LIBRARIES( kchmviewer /a X11' src/CMakeLists.txt
# source files renamed in 7.7 when QtWebEngine support was added
sed -i 's/viewwindow.cpp/viewwindow_webkit.cpp/' src/CMakeLists.txt
sed -i 's/qwebviewnetwork.cpp/dataprovider_qwebkit.cpp/' src/CMakeLists.txt
%build
%cmake_kde4 -d build
%make_jobs
%install
pushd build
make DESTDIR=%{buildroot} install
popd
%{__mkdir_p} %{buildroot}%{_datadir}/pixmaps
install src/resources/kchmviewer.png %{buildroot}%{_datadir}/pixmaps
%kde_post_install
%find_lang %name
%files -f %name.lang
%defattr(-,root,root)
%{_bindir}/kchmviewer
%{_datadir}/applications/kde4/kchmviewer.desktop
%{_datadir}/pixmaps/kchmviewer.*
%changelog