File kontrast.spec of Package kontrast

# spec file for package kontrast
# Copyright (c) 2023 SUSE LLC
# 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 released
Name:           kontrast
Version:        23.08.4
Release:        0
Summary:        Contrast checker
License:        GPL-3.0-or-later AND CC0-1.0
%if %{with released}
Source2:        applications.keyring
BuildRequires:  extra-cmake-modules
%if 0%{?suse_version} == 1500
# gcc10 is not enough. Missing std::coroutine_handle
BuildRequires:  gcc12-c++
BuildRequires:  gcc12-PIE
BuildRequires:  update-desktop-files
BuildRequires:  cmake(FutureSQL5)
BuildRequires:  cmake(KF5CoreAddons)
BuildRequires:  cmake(KF5Declarative)
BuildRequires:  cmake(KF5DocTools)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5Kirigami2)
BuildRequires:  cmake(QCoro5Core)
BuildRequires:  cmake(Qt5Core) >= 5.15.2
BuildRequires:  cmake(Qt5DBus)
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5Qml)
BuildRequires:  cmake(Qt5QuickControls2)
BuildRequires:  cmake(Qt5Sql)
BuildRequires:  cmake(Qt5Svg)
Requires:       kirigami2
Requires:       libqt5-qtquickcontrols

Kontrast allows choosing background and text color that are easy to read when
used together.

%autosetup -p1

%if 0%{?suse_version} == 1500
  export CXX=g++-12
%cmake_kf5 -d build

%kf5_makeinstall -C build

%find_lang %{name}

%suse_update_desktop_file -r org.kde.kontrast Qt KDE Utility Accessibility

%license LICENSES/*
%doc %lang(en) %{_kf5_htmldir}/en/kontrast/

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by