File okular.spec of Package okular4

# spec file for package okular
# Copyright (c) 2015 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:           okular
Version:        16.08.3
Release:        0
Summary:        Document Viewer
License:        GPL-2.0+
Group:          Productivity/Office/Other
Patch0:         fix-priority-okular.diff
# PATCH-FIX-UPSTREAM kde4_includes.patch -- search for includes in standard kde4 include directory (don't assume it's hardcoded to include/ )
Patch1:         kde4_includes.patch
Patch2:         Fix-misuse-of-bool.patch
BuildRequires:  OpenEXR-devel
BuildRequires:  chmlib-devel
BuildRequires:  fdupes
BuildRequires:  fribidi-devel
BuildRequires:  libdjvulibre-devel
BuildRequires:  libepub-devel
BuildRequires:  libgphoto2-devel
BuildRequires:  libkactivities-devel
BuildRequires:  libkde4-devel
BuildRequires:  pkgconfig(libkexiv2)
BuildRequires:  libkscreen-devel >= 1.0.2
BuildRequires:  pkgconfig(poppler-qt4)
BuildRequires:  pkgconfig(qca2)
BuildRequires:  pkgconfig(qimageblitz)
BuildRequires:  libqjson-devel
BuildRequires:  libspectre-devel
BuildRequires:  mobipocket-devel
BuildRequires:  net-snmp-devel
BuildRequires:  oxygen-icon-theme-large
BuildRequires:  xz
%if 0%{?suse_version} > 1130
BuildRequires:  sane-backends-devel
BuildRequires:  sane-backends
Obsoletes:      kdegraphics4 < 4.7.0
Provides:       kdegraphics4 = 4.7.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%requires_ge    libpoppler-qt4-3

Document viewing program; supports document in PDF, PS and
many other formats.

%package devel
Summary:        Document Viewer - Development Files
Group:          Development/Libraries/KDE
Requires:       %{name} = %{version}
Requires:       libkde4-devel
Provides:       kde4-%{name}-devel = 4.3.0
Obsoletes:      kde4-%{name}-devel < 4.3.0

%description devel
Document viewing program; supports document in PDF, PS and
many other formats.

The okular-devel package contains libraries and header files for
developing applications that use okular.

%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -p1

  %cmake_kde4 -d build

  cd build
  cd ..
  for i in 16 22 32 48 64 128
     mkdir -p %{buildroot}%{_kde4_iconsdir}/hicolor/${i}x${i}/apps
     cp %{_kde4_iconsdir}/oxygen/${i}x${i}/apps/graphics-viewer-document.png %{buildroot}%{_kde4_iconsdir}/hicolor/${i}x${i}/apps/ \
     || cp %{_kde4_iconsdir}/oxygen/base/${i}x${i}/apps/graphics-viewer-document.png %{buildroot}%{_kde4_iconsdir}/hicolor/${i}x${i}/apps/

  %suse_update_desktop_file -r %{name} Office Viewer
  %fdupes -s %{buildroot}%{_prefix}


%post   -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%config %{_kde4_configkcfgdir}/*.kcfg

%files devel

openSUSE Build Service is sponsored by