File kio.spec of Package kio

#
# spec file for package kio
#
# 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 http://bugs.opensuse.org/
#


%bcond_without lang
%define _tar_path 5.13
Name:           kio
Version:        5.13.0
Release:        0
%define kf5_version %{version}
BuildRequires:  cmake >= 2.8.12
BuildRequires:  extra-cmake-modules >= %{_tar_path}
BuildRequires:  fdupes
BuildRequires:  karchive-devel >= %{_tar_path}
BuildRequires:  kbookmarks-devel >= %{_tar_path}
BuildRequires:  kcompletion-devel >= %{_tar_path}
BuildRequires:  kconfigwidgets-devel >= %{_tar_path}
BuildRequires:  kcoreaddons-devel >= %{_tar_path}
BuildRequires:  kdbusaddons-devel >= %{_tar_path}
BuildRequires:  kdoctools-devel >= %{_tar_path}
BuildRequires:  kf5-filesystem
BuildRequires:  kguiaddons-devel >= %{_tar_path}
BuildRequires:  ki18n-devel >= %{_tar_path}
BuildRequires:  kiconthemes-devel >= %{_tar_path}
BuildRequires:  kitemviews-devel >= %{_tar_path}
BuildRequires:  kjobwidgets-devel >= %{_tar_path}
BuildRequires:  knotifications-devel >= %{_tar_path}
BuildRequires:  krb5-devel
BuildRequires:  kservice-devel >= %{_tar_path}
BuildRequires:  ktextwidgets-devel >= %{_tar_path}
BuildRequires:  kwallet-devel >= %{_tar_path}
BuildRequires:  kwidgetsaddons-devel >= %{_tar_path}
BuildRequires:  kwindowsystem-devel >= %{_tar_path}
BuildRequires:  kxmlgui-devel >= %{_tar_path}
BuildRequires:  libacl-devel
BuildRequires:  libattr-devel
BuildRequires:  solid-devel >= %{_tar_path}
BuildRequires:  cmake(Qt5Concurrent) >= 5.3.0
BuildRequires:  cmake(Qt5Core) >= 5.3.0
BuildRequires:  cmake(Qt5DBus) >= 5.3.0
BuildRequires:  cmake(Qt5Network) >= 5.3.0
BuildRequires:  cmake(Qt5Script) >= 5.3.0
BuildRequires:  cmake(Qt5Test) >= 5.3.0
BuildRequires:  cmake(Qt5Widgets) >= 5.3.0
BuildRequires:  cmake(Qt5X11Extras) >= 5.3.0
BuildRequires:  cmake(Qt5Xml) >= 5.3.0
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(x11)
Requires:       %{name}-core = %{version}
%if %{with lang}
Recommends:     %{name}-lang = %{version}
%endif
Recommends:     kio-extras5
# KIO/FileDialog uses klauncher directly, but we can't add Requires, as that would introduce dep cycle
Recommends:     kinit
Summary:        Network transparent access to files and data
License:        LGPL-2.1+
Group:          System/GUI/KDE
Url:            http://www.kde.org
Source:         http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
Source1:        baselibs.conf
# PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5
Patch0:         kio_help-fallback-to-kde4-docs.patch
# PATCH-FIX-UPSTREAM show-custom-folder-icons-sgain.patch
Patch1:         show-custom-folder-icons-sgain.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This framework implements almost all the file management functions you
will ever need. In fact, the KDE file manager (Dolphin) and the KDE
file dialog also uses this to provide its network-enabled file management.

%package core
Summary:        Network transparent access to files and data
Group:          System/GUI/KDE
# core subpackage created with 5.9.0
Conflicts:      kio <= 5.8.0

%description core
This framework implements almost all the file management functions you
will ever need. In fact, the KDE file manager (Dolphin) and the KDE
file dialog also uses this to provide its network-enabled file management.
KIO core libraries, ioslave and daemons.

%package devel
Summary:        Network transparent access to files and data
Group:          Development/Libraries/KDE
Requires:       %{name} = %{version}
Requires:       %{name}-core = %{version}
Requires:       extra-cmake-modules
Requires:       kbookmarks-devel >= %{_tar_path}
Requires:       kcompletion-devel >= %{_tar_path}
Requires:       kconfig-devel >= %{_tar_path}
Requires:       kcoreaddons-devel >= %{_tar_path}
Requires:       kitemviews-devel >= %{_tar_path}
Requires:       kjobwidgets-devel >= %{_tar_path}
Requires:       kservice-devel >= %{_tar_path}
Requires:       kxmlgui-devel >= %{_tar_path}
Requires:       solid-devel >= %{_tar_path}
Requires:       cmake(Qt5Network) >= 5.3.0

%description devel
This framework implements almost all the file management functions you
will ever need. In fact, the KDE file manager (Dolphin) and the KDE
file dialog also uses this to provide its network-enabled file management.
Development files.

%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
  %cmake_kf5 -d build
  %make_jobs

%install
  %kf5_makeinstall -C build
  %fdupes %{buildroot}

%if %{with lang}
%find_lang %{name}5 %{name}5.lang
echo "%doc %lang(ca) %{_kf5_mandir}/ca" >>%{name}5.lang
echo "%doc %lang(de) %{_kf5_mandir}/de" >>%{name}5.lang
echo "%doc %lang(it) %{_kf5_mandir}/it" >>%{name}5.lang
echo "%doc %lang(nl) %{_kf5_mandir}/nl" >>%{name}5.lang
echo "%doc %lang(pt_BR) %{_kf5_mandir}/pt_BR" >>%{name}5.lang
echo "%doc %lang(sv) %{_kf5_mandir}/sv" >>%{name}5.lang
echo "%doc %lang(uk) %{_kf5_mandir}/uk" >>%{name}5.lang
%endif

%post core -p /sbin/ldconfig

%postun core -p /sbin/ldconfig

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

%files core
%doc COPYING* README*
%{_kf5_libdir}/libKF5KIOCore.so.*
%{_kf5_configdir}/accept-languages.codes
%{_kf5_libdir}/libKF5KIONTLM.so.*
%dir %{_kf5_plugindir}/kf5
%dir %{_kf5_plugindir}/kf5/kio
%{_kf5_plugindir}/kf5/kio/file.so
%{_kf5_servicesdir}/file.protocol
%{_kf5_plugindir}/kf5/kio/ftp.so
%{_kf5_servicesdir}/ftp.protocol
%{_kf5_plugindir}/kf5/kio/help.so
%{_kf5_plugindir}/kf5/kio/ghelp.so
%{_kf5_servicesdir}/help.protocol
%{_kf5_servicesdir}/ghelp.protocol
%{_kf5_libexecdir}/kio_http_cache_cleaner
%{_kf5_plugindir}/kf5/kio/http.so
%{_kf5_servicesdir}/http_cache_cleaner.desktop
%{_kf5_servicesdir}/http.protocol
%{_kf5_servicesdir}/https.protocol
%{_kf5_servicesdir}/webdav.protocol
%{_kf5_servicesdir}/webdavs.protocol
%{_kf5_bindir}/kmailservice5
%{_kf5_applicationsdir}/kmailservice5.desktop
%{_kf5_servicesdir}/data.protocol
%{_kf5_servicesdir}/rtsp.protocol
%{_kf5_servicesdir}/mms.protocol
%{_kf5_servicesdir}/mmst.protocol
%{_kf5_servicesdir}/mmsu.protocol
%{_kf5_servicesdir}/pnm.protocol
%{_kf5_servicesdir}/rtspt.protocol
%{_kf5_servicesdir}/rtspu.protocol
%{_kf5_bindir}/ktelnetservice5
%{_kf5_applicationsdir}/ktelnetservice5.desktop
%{_kf5_plugindir}/kf5/kio/trash.so
%{_kf5_bindir}/ktrash5
%{_kf5_plugindir}/kcm_trash.so
%{_kf5_servicesdir}/trash.protocol
%{_kf5_servicesdir}/kcmtrash.desktop
%{_kf5_libexecdir}/kiod5
%{_kf5_sharedir}/dbus-1/services/org.kde.kiod5.service
%dir %{_kf5_plugindir}/kf5/kiod
%{_kf5_plugindir}/kf5/kiod/kssld.so

%files
%defattr(-,root,root)
%doc COPYING* README*
%{_kf5_libdir}/libKF5KIOWidgets.so.*
%{_kf5_libdir}/libKF5KIOFileWidgets.so.*
%{_kf5_configdir}/kshorturifilterrc
%{_kf5_servicetypesdir}/
%{_kf5_bindir}/kcookiejar5
%{_kf5_datadir}/kcookiejar/
%{_kf5_libexecdir}/kpac_dhcp_helper
%{_kf5_libexecdir}/kioslave
%{_kf5_libexecdir}/kioexec
%{_kf5_notifydir}/proxyscout.notifyrc
%{_kf5_plugindir}/kcm_kio.so
%{_kf5_plugindir}/kcm_webshortcuts.so
%dir %{_kf5_plugindir}/kf5/kded
%{_kf5_plugindir}/kf5/kded/kcookiejar.so
%{_kf5_plugindir}/kf5/kded/kpasswdserver.so
%{_kf5_plugindir}/kf5/kded/proxyscout.so
%{_kf5_plugindir}/kf5/urifilters/
%{_kf5_servicesdir}/cache.desktop
%{_kf5_servicesdir}/cookies.desktop
%{_kf5_servicesdir}/fixhosturifilter.desktop
%dir %{_kf5_servicesdir}/kded
%{_kf5_servicesdir}/kded/proxyscout.desktop
%{_kf5_servicesdir}/kshorturifilter.desktop
%{_kf5_servicesdir}/kuriikwsfilter.desktop
%{_kf5_servicesdir}/kurisearchfilter.desktop
%{_kf5_servicesdir}/localdomainurifilter.desktop
%{_kf5_servicesdir}/netpref.desktop
%{_kf5_servicesdir}/proxy.desktop
%{_kf5_servicesdir}/searchproviders/
%{_kf5_servicesdir}/smb.desktop
%{_kf5_servicesdir}/useragent.desktop
%{_kf5_servicesdir}/useragentstrings/
%{_kf5_servicesdir}/webshortcuts.desktop
%doc %lang(en) %{_kf5_mandir}/*/kcookiejar5.*
%dir %{_kf5_htmldir}/en
%dir %{_kf5_htmldir}
%doc %lang(en) %{_kf5_htmldir}/en/*/

%files devel
%defattr(-,root,root)
%{_kf5_libdir}/libKF5KIOCore.so
%{_kf5_libdir}/libKF5KIOWidgets.so
%{_kf5_libdir}/libKF5KIOFileWidgets.so
%{_kf5_libdir}/libKF5KIONTLM.so
%{_kf5_libdir}/cmake/KF5KIO/
%{_kf5_includedir}/
%{_kf5_dbusinterfacesdir}/kf5_org.kde.KDirNotify.xml
%{_kf5_dbusinterfacesdir}/kf5_org.kde.KPasswdServer.xml
%{_kf5_dbusinterfacesdir}/kf5_org.kde.KSlaveLauncher.xml
%{_kf5_dbusinterfacesdir}/kf5_org.kde.kio.FileUndoManager.xml
%{_kf5_dbusinterfacesdir}/kf5_org.kde.KCookieServer.xml
%{_kf5_mkspecsdir}/qt_KIOCore.pri
%{_kf5_mkspecsdir}/qt_KIOFileWidgets.pri
%{_kf5_mkspecsdir}/qt_KNTLM.pri
%{_kf5_mkspecsdir}/qt_KIOWidgets.pri

%changelog
openSUSE Build Service is sponsored by