File kalgebra.spec of Package kalgebra

# spec file for package kalgebra
# Copyright (c) 2024 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

# Internal QML imports
%global __requires_exclude qt6qmlimport\\((widgets|org\\.kde\\.kalgebra\\.mobile).*

%define kf6_version 6.0.0
%define qt6_version 6.6.0
%define plasma6_version 5.27.80

%bcond_without released
Name:           kalgebra
Version:        24.05.0
Release:        0
Summary:        Math Expression Solver and Plotter
License:        GPL-2.0-or-later
%if %{with released}
Source2:        applications.keyring
BuildRequires:  kf6-extra-cmake-modules >= %{kf6_version}
BuildRequires:  fdupes
BuildRequires:  ncurses-devel
BuildRequires:  perl
BuildRequires:  readline-devel
BuildRequires:  cmake(Analitza6)
BuildRequires:  cmake(KF6ConfigWidgets) >= %{kf6_version}
BuildRequires:  cmake(KF6CoreAddons) >= %{kf6_version}
BuildRequires:  cmake(KF6DocTools) >= %{kf6_version}
BuildRequires:  cmake(KF6I18n) >= %{kf6_version}
BuildRequires:  cmake(KF6KIO) >= %{kf6_version}
BuildRequires:  cmake(KF6WidgetsAddons) >= %{kf6_version}
BuildRequires:  cmake(KF6XmlGui) >= %{kf6_version}
BuildRequires:  cmake(Plasma) >= %{plasma6_version}
BuildRequires:  cmake(Qt6OpenGLWidgets) >= %{qt6_version}
BuildRequires:  cmake(Qt6PrintSupport) >= %{qt6_version}
BuildRequires:  cmake(Qt6Qml) >= %{qt6_version}
BuildRequires:  cmake(Qt6Quick) >= %{qt6_version}
BuildRequires:  cmake(Qt6Svg) >= %{qt6_version}
BuildRequires:  cmake(Qt6Test) >= %{qt6_version}
BuildRequires:  cmake(Qt6WebEngineWidgets) >= %{qt6_version}
BuildRequires:  cmake(Qt6Widgets) >= %{qt6_version}
BuildRequires:  cmake(Qt6Xml) >= %{qt6_version}
Obsoletes:      kalgebra5 < %{version}
Provides:       kalgebra5 = %{version}
# It can only build on the same platforms as Qt Webengine
ExclusiveArch:  x86_64 %x86_64 aarch64 riscv64

KAlgebra is a math expression solver and plotter.

%package mobile
Summary:        Math Expression Solver and Plotter - mobile version
Requires:       kf6-kirigami-imports >= %{kf6_version}
Requires:       qt6-declarative-imports >= %{qt6_version}

%description mobile
KAlgebra is a math expression solver and plotter. This package includes
a QtQuick based version for use in mobile (phone, tablet) environments.

%lang_package -n %{name}-mobile

%autosetup -p1




%find_lang kalgebra --with-html
%find_lang kalgebramobile

# 'nothing provides qt6qmlimport(org.kde.plasma.components.2) needed by kalgebra'
rm -r %{buildroot}%{_kf6_plasmadir}/plasmoids/org.kde.graphsplasmoid/

%fdupes %{buildroot}

%license COPYING*
%doc %lang(en) %{_kf6_htmldir}/en/kalgebra
%dir %{_kf6_sharedir}/katepart5
%dir %{_kf6_sharedir}/katepart5/syntax

%files mobile
%license COPYING*

%files lang -f kalgebra.lang
%exclude %{_kf6_htmldir}/en/kalgebra

%files mobile-lang -f kalgebramobile.lang

openSUSE Build Service is sponsored by