File okular.spec of Package okular

#
# spec file for package okular
#
# Copyright (c) 2013 SUSE LINUX Products 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:           okular
Version:        4.11.2
Release:        0
Summary:        Document Viewer
License:        GPL-2.0+
Group:          Productivity/Office/Other
Url:            http://www.kde.org
Source0:        %{name}-%{version}.tar.xz
Patch0:         fix-priority-okular.diff
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:  libpoppler-qt4-devel
BuildRequires:  libqca2-devel
BuildRequires:  libqimageblitz-devel
BuildRequires:  libspectre-devel
BuildRequires:  net-snmp-devel
BuildRequires:  oxygen-icon-theme-large
BuildRequires:  soprano-backend-redland
BuildRequires:  xz
%if 0%{?suse_version} > 1130
BuildRequires:  sane-backends-devel
%else
BuildRequires:  sane-backends
%endif
Obsoletes:      kdegraphics4 < 4.7.0
Provides:       kdegraphics4 = 4.7.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%requires_ge    libpoppler-qt4-3
%kde4_runtime_requires

%description
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
%kde4_runtime_requires

%description devel
Document viewing program; supports document in various formats

%prep
%setup -q
%patch0 -p0

%build
  %cmake_kde4 -d build
  %make_jobs

%install
  cd build
  %kde4_makeinstall
  mkdir -p %{buildroot}%{_kde4_iconsdir}/hicolor/{16x16,22x22,32x32,48x48,64x64,128x128}/apps
  cp %{_kde4_iconsdir}/oxygen/128x128/apps/graphics-viewer-document.png %{buildroot}%{_kde4_iconsdir}/hicolor/128x128/apps/
  cp %{_kde4_iconsdir}/oxygen/16x16/apps/graphics-viewer-document.png %{buildroot}%{_kde4_iconsdir}/hicolor/16x16/apps/
  cp %{_kde4_iconsdir}/oxygen/22x22/apps/graphics-viewer-document.png %{buildroot}%{_kde4_iconsdir}/hicolor/22x22/apps/
  cp %{_kde4_iconsdir}/oxygen/32x32/apps/graphics-viewer-document.png %{buildroot}%{_kde4_iconsdir}/hicolor/32x32/apps/
  cp %{_kde4_iconsdir}/oxygen/48x48/apps/graphics-viewer-document.png %{buildroot}%{_kde4_iconsdir}/hicolor/48x48/apps/
  cp %{_kde4_iconsdir}/oxygen/64x64/apps/graphics-viewer-document.png %{buildroot}%{_kde4_iconsdir}/hicolor/64x64/apps/
  cd ..
  %suse_update_desktop_file -r okular   Office Viewer
  %fdupes -s %{buildroot}%{_datadir}
  %kde_post_install

%post   -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_kde4_applicationsdir}/okular*.desktop
%{_kde4_applicationsdir}/active-documentviewer_*.desktop
%{_kde4_appsdir}/okular/
%{_kde4_bindir}/okular
%config %{_kde4_configkcfgdir}/*.kcfg
%{_kde4_htmldir}/en/okular/
%{_kde4_iconsdir}/hicolor/*/apps/graphics-viewer-document.*
%{_kde4_iconsdir}/hicolor/*/apps/okular.*
%{_kde4_libdir}/libokularcore.so.*
%{_kde4_modulesdir}/*.so
%{_kde4_servicesdir}/*.desktop
%{_kde4_servicesdir}/*.protocol
%{_kde4_servicetypesdir}/*.desktop
%{_kde4_appsdir}/kconf_update/okular.upd
%{_kde4_modulesdir}/imports/
%{_mandir}/man1/okular.1.gz

%files devel
%defattr(-,root,root)
%{_kde4_includedir}/okular/
%{_kde4_libdir}/cmake/Okular/
%{_kde4_libdir}/libokularcore.so

%changelog
openSUSE Build Service is sponsored by