A new user interface for you!

File discover.spec of Package discover

# spec file for package discover
# Copyright (c) 2018 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
Name:           discover
Version:        5.12.7
Release:        0
Summary:        Software store for the KDE Plasma desktop
License:        GPL-2.0-only AND GPL-3.0-only AND GPL-3.0-or-later
Group:          System/GUI/KDE
Url:            https://quickgit.kde.org/?p=discover.git
Source:         discover-%{version}.tar.xz
Patch1:         0001-Warning-for-FlatHub.patch
%if 0%{?suse_version} < 1330
# It does not build with the default compiler (GCC 4.8) on Leap 42.x
%if 0%{?sle_version} < 120300
BuildRequires:  gcc6-c++
BuildRequires:  gcc7-c++
BuildRequires:  PackageKit-Qt5-devel
BuildRequires:  cmake >= 2.8.12
BuildRequires:  extra-cmake-modules
BuildRequires:  flatpak-devel
BuildRequires:  kf5-filesystem
BuildRequires:  kirigami2-devel
BuildRequires:  update-desktop-files
BuildRequires:  cmake(AppStreamQt) >= 0.11.1
BuildRequires:  cmake(KF5Archive)
BuildRequires:  cmake(KF5Attica)
BuildRequires:  cmake(KF5Config)
BuildRequires:  cmake(KF5CoreAddons)
BuildRequires:  cmake(KF5Crash)
BuildRequires:  cmake(KF5DBusAddons)
BuildRequires:  cmake(KF5Declarative)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5ItemModels)
BuildRequires:  cmake(KF5KIO)
BuildRequires:  cmake(KF5NewStuff)
BuildRequires:  cmake(KF5Notifications)
BuildRequires:  cmake(KF5Plasma)
BuildRequires:  cmake(KF5TextWidgets)
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  cmake(Qca-qt5)
BuildRequires:  cmake(Qt5Concurrent)
BuildRequires:  cmake(Qt5DBus)
BuildRequires:  cmake(Qt5Network)
BuildRequires:  cmake(Qt5Qml)
BuildRequires:  cmake(Qt5Quick)
BuildRequires:  cmake(Qt5Test)
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  cmake(Qt5Xml)
Requires:       kirigami2
Requires:       libqt5-qtquickcontrols2
Recommends:     %{name}-lang
Recommends:     %{name}-backend-packagekit
Recommends:     %{name}-backend-flatpak

Discover is a graphical software manager for the KDE Plasma desktop. It helps users to find software they might want easily and quickly.

By allowing to navigate a software library by search, categories, top lists along with detailed application information including screenshots and reviews, users can more quickly find applications that suit their needs.

%package backend-packagekit
Summary:        PackageKit Backend for Discover
Group:          System/GUI/KDE
Requires:       %{name} = %{version}
# Technically libdiscover and not the backend implements AppStream support, but
# it's useless without system package management
Requires:       AppStream
Requires:       PackageKit
%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120300
Requires:       appstream-provider
Requires:       libzypp-plugin-appdata

%description backend-packagekit
A plugin for Discover to support management of system packages and repositories
using PackageKit.

%package backend-flatpak
Summary:        Flatpak Backend for Discover
Group:          System/GUI/KDE
Requires:       %{name} = %{version}
Requires:       flatpak

%description backend-flatpak
A plugin for Discover to support installation and management of Flatpak
applications and repositories.

%package plasmoid
Summary:        Update notification plasmoid for KDE Software Manager
Group:          System/GUI/KDE
Conflicts:      plasma5-pk-updates
Requires:       %{name} = %{version}

%description plasmoid
This is a plasmoid to notify the user that updates are available and allows the
user to install them using Discover.


%setup -q
%autopatch -p1

  %if 0%{?suse_version} < 1330
    # It does not build with the default compiler (GCC 4.8) on Leap 42.x
  %if 0%{?sle_version} < 120300
    export CC=gcc-6
    export CXX=g++-6
    export CC=gcc-7
    export CXX=g++-7
  %cmake_kf5 -d build

  %kf5_makeinstall -C build
  %suse_update_desktop_file -r org.kde.discover Qt KDE System PackageManager

%if %{with lang}
  %find_lang libdiscover %{name}.lang
  %find_lang plasma-discover-notifier %{name}.lang
  %find_lang plasma-discover %{name}.lang

  %find_lang plasma_applet_org.kde.discovernotifier plasma.lang
  touch plasma.lang

%license COPYING*
%dir %{_kf5_plugindir}/discover/
%dir %{_kf5_sharedir}/libdiscover/
%dir %{_kf5_sharedir}/libdiscover/categories/
%config %{_kf5_configdir}/discover_ktexteditor_codesnippets_core.knsrc

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

%files backend-packagekit
%license COPYING*

%files backend-flatpak
%license COPYING*

%files plasmoid -f plasma.lang
%license COPYING*
%dir %{_kf5_sharedir}/plasma
%dir %{_kf5_sharedir}/plasma/plasmoids