File kio-gdrive.spec of Package kio-gdrive

# spec file for package kio-gdrive
# Copyright (c) 2017 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:           kio-gdrive
Version:        1.1.2
Release:        0
Summary:        Google Drive KIO-slave for KDE applications
License:        GPL-2.0+
Group:          System/GUI/KDE
BuildRequires:  extra-cmake-modules
BuildRequires:  ki18n-devel >= 5.14.0
BuildRequires:  kio-devel >= 5.14.0
BuildRequires:  libkgapi-devel >= 5.3.1
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  cmake(Qt5Keychain) >= 0.6.0
BuildRequires:  pkgconfig(Qt5Network) >= 5.2.0
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.2.0
# Used by the .desktop file
Recommends:     dolphin
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %{with lang}

Google Drive KIO-slave for KDE applications.
KIO GDrive requires a KIO-enabled file manager at runtime,
otherwise there is no way to setup a Google Drive account.
This can be Dolphin or Gwenview or Konqueror.

%setup -q

  %cmake_kf5 -d build

  %kf5_makeinstall -C build
  %if %{with lang}
  %find_lang kio5_gdrive %{name}.lang
  %if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120300
  # %%kf5_find_htmldocs is only defined since Leap 42.3
  pushd %{buildroot}%{_kf5_htmldir}
  for i in *; do
    if ! [ -d "/usr/share/locale/${i}" ]; then
        echo "Removing unsupported translation %{_kf5_htmldir}/${i}"
        rm -rf "$i"
    elif [ "$i" != "en" ]; then
        echo "%doc %lang($i) %{_kf5_htmldir}/${i}" >> $CURDIR/%{name}.lang

%doc COPYING README.packagers
%doc %lang(en) %{_kf5_htmldir}/en/kioslave5/gdrive/
%dir %{_datadir}/remoteview

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

openSUSE Build Service is sponsored by