File okular.spec of Package okular

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

%bcond_without lang

Name:           okular
Version:        17.04.2
Release:        0
%define kf5_version 5.26.0
# Latest stable Applications (e.g. 16.08 in KA, but 16.11.80 in KUA)
%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
Summary:        Document Viewer
License:        GPL-2.0+
Group:          Productivity/Office/Other
Source:         %{name}-%{version}.tar.xz
BuildRequires:  chmlib-devel
BuildRequires:  extra-cmake-modules
BuildRequires:  freetype2-devel
BuildRequires:  kactivities5-devel
BuildRequires:  karchive-devel
BuildRequires:  kbookmarks-devel
BuildRequires:  kcompletion-devel
BuildRequires:  kconfig-devel
BuildRequires:  kconfigwidgets-devel
BuildRequires:  kcoreaddons-devel
BuildRequires:  kdbusaddons-devel
BuildRequires:  kdoctools-devel
BuildRequires:  kf5-filesystem
BuildRequires:  khtml-devel
BuildRequires:  kiconthemes-devel
BuildRequires:  kio-devel
BuildRequires:  kjs-devel
BuildRequires:  kparts-devel
BuildRequires:  kpty-devel
BuildRequires:  kwallet-devel
BuildRequires:  kwindowsystem-devel
BuildRequires:  libdjvulibre-devel
BuildRequires:  libepub-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libkexiv2-devel
BuildRequires:  libpoppler-qt5-devel
BuildRequires:  libqca-qt5-devel
BuildRequires:  libspectre-devel
BuildRequires:  libtiff-devel
BuildRequires:  mobipocket-devel
BuildRequires:  phonon4qt5-devel
BuildRequires:  pkgconfig
BuildRequires:  threadweaver-devel
BuildRequires:  pkgconfig(Qt5Core) >= 5.6.0
BuildRequires:  pkgconfig(Qt5DBus) >= 5.6.0
BuildRequires:  pkgconfig(Qt5PrintSupport) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Qml) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Quick) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Svg) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Test) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.6.0
Buildrequires:  zlib-devel
Obsoletes:      okular5 < %{version}
Provides:       okular5 = %{version}
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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:       cmake(Qt5Core) >= 5.6.0
Requires:       cmake(Qt5PrintSupport) >= 5.6.0
Requires:       cmake(Qt5Widgets) >= 5.6.0
Requires:       cmake(KF5CoreAddons)
Requires:       cmake(KF5Config)
Requires:       cmake(KF5XmlGui)
Obsoletes:      okular5-devel < %{version}
Provides:       okular5-devel = %{version}

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

%if %{with lang}

%setup -q -n okular-%{version}

%cmake_kf5 -d build

%make_install -C build
%if %{with lang}
  %find_lang %{name} --with-man --all-name

rm -rfv %{buildroot}/%{_kf5_applicationsdir}/*

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%dir %{_kf5_appstreamdir}
%dir %{_kf5_htmldir}/en
%dir %{_kf5_htmldir}
%doc %{_kf5_htmldir}/en/*/
%doc %{_kf5_mandir}/man1/okular.*

%files devel

%if %{with lang}
%files lang -f %{name}.lang

openSUSE Build Service is sponsored by