File krusader.spec of Package krusader

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

Name:           krusader
Version:        2.5.0
Release:        0
Summary:        A File Manager
License:        GPL-2.0+
Group:          Productivity/File utilities
Source1:        krusader_browse_iso.desktop
# PATCH-FIX-OPENSUSE krusader-2.5.0-generate-manpage.patch -- generate manpage
Patch0:         krusader-2.5.0-generate-manpage.patch
# PATCH-FIX-UPSTREAM 0001-Don-t-hardcode-appdata-location.patch
Patch1:         0001-Don-t-hardcode-appdata-location.patch
# PATCH-FIX-UPSTREAM Remove-non-archive-mimetypes-from-krarc-archive-mime-type-list.patch boo#1011320, kde#371765 -- fixes dolphin opening e.g. LibreOffice files as archives
Patch2:         Remove-non-archive-mimetypes-from-krarc-archive-mime-type-list.patch
BuildRequires:  extra-cmake-modules >= 1.1.0
BuildRequires:  fdupes
BuildRequires:  libacl-devel
BuildRequires:  libattr-devel
BuildRequires:  update-desktop-files
BuildRequires:  cmake(KF5Archive)
BuildRequires:  cmake(KF5Bookmarks)
BuildRequires:  cmake(KF5Codecs)
BuildRequires:  cmake(KF5Completion)
BuildRequires:  cmake(KF5Config)
BuildRequires:  cmake(KF5CoreAddons)
BuildRequires:  cmake(KF5DocTools)
BuildRequires:  cmake(KF5GuiAddons)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5IconThemes)
BuildRequires:  cmake(KF5ItemViews)
BuildRequires:  cmake(KF5KIO)
BuildRequires:  cmake(KF5Notifications)
BuildRequires:  cmake(KF5Parts)
BuildRequires:  cmake(KF5Solid)
BuildRequires:  cmake(KF5TextWidgets)
BuildRequires:  cmake(KF5Wallet)
BuildRequires:  cmake(KF5WidgetsAddons)
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  cmake(KF5XmlGui)
BuildRequires:  cmake(Qt5Core) >= 5.2.0
BuildRequires:  cmake(Qt5DBus) >= 5.2.0
BuildRequires:  cmake(Qt5Gui) >= 5.2.0
BuildRequires:  cmake(Qt5PrintSupport) >= 5.2.0
BuildRequires:  cmake(Qt5Widgets) >= 5.2.0
BuildRequires:  cmake(Qt5Xml) >= 5.2.0
Requires:       kio_iso = %{version}
Suggests:       %{name}-doc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

An advanced twin panel (commander style) file manager for KDE.

%package -n kio_iso
Summary:        KIO slave to access ISO images
Group:          System/GUI/KDE
Provides:       kde4-kio_iso = 1.80.99
Obsoletes:      kde4-kio_iso < 1.80.99

%description -n kio_iso
KIO slave to access ISO images like zip- or tar.gz-archives in your

%package doc
Summary:        A File Manager
Group:          Productivity/File utilities

%description doc
An advanced twin panel (commander style) file manager for KDE.

%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1

export RPM_OPT_FLAGS="%{optflags} -fpermissive"
%cmake_kf5 -d build

%kf5_makeinstall -C build
mkdir -p %{buildroot}%{_kf5_servicesdir}/ServiceMenus/
cp %{SOURCE1} %{buildroot}%{_kf5_servicesdir}/ServiceMenus/
%suse_update_desktop_file org.kde.krusader.root-mode FileManager Utility
%find_lang %{name}
%fdupes %{buildroot}

%post   -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%exclude %{_kf5_htmldir}/*/krusader
%dir %{_kf5_appstreamdir}

%files -n kio_iso
%config %{_kf5_configdir}/kio_isorc
%dir %{_kf5_servicesdir}/ServiceMenus

%files doc
%doc %lang(en) %{_kf5_htmldir}/en/krusader
%doc %lang(uk) %{_kf5_htmldir}/uk/krusader
%doc %lang(sv) %{_kf5_htmldir}/sv/krusader
%dir %{_kf5_htmldir}/pt_BR
%doc %lang(pt_BR) %{_kf5_htmldir}/pt_BR/krusader