File gcompris-qt.spec of Package gcompris
#
# spec file for package gcompris-qt
#
# Copyright (c) 2026 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 https://bugs.opensuse.org/
#
%define _name org.kde.gcompris
Name: gcompris-qt
Version: @SERVICE@
Release: 0
Summary: High-quality educational software suite for children aged 2 to 10
License: AGPL-3.0-only
Group: Amusements/Teaching/Other
URL: https://invent.kde.org/education/gcompris
Source0: %{name}-%{version}.tar.xz
BuildRequires: appstream-glib
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: kf6-extra-cmake-modules
BuildRequires: pkgconfig
BuildRequires: qml-box2d
BuildRequires: cmake(KF6DocTools)
BuildRequires: cmake(Qt6Charts)
BuildRequires: cmake(Qt6CorePrivate)
BuildRequires: cmake(Qt6Graphs)
BuildRequires: cmake(Qt6LabsFolderListModel)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6Multimedia)
BuildRequires: cmake(Qt6Quick3D)
BuildRequires: cmake(Qt6QuickControls2Basic)
BuildRequires: cmake(Qt6QuickDialogs2)
BuildRequires: cmake(Qt6QuickDialogs2QuickImpl)
BuildRequires: cmake(Qt6QuickShapesPrivate)
BuildRequires: cmake(Qt6Sensors)
BuildRequires: cmake(Qt6Sql)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt6Test)
BuildRequires: cmake(Qt6WaylandClient)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(icu-uc)
BuildRequires: pkgconfig(openssl)
Requires: %{name}-activities = %{version}
Recommends: %{name}-lang = %{version}
%description
GCompris is a high quality educational software suite, including a large
number of activities for children aged 2 to 10. Some of the activities are
game orientated, but still educational.
%lang_package
%package activities
Summary: Activity files for %{name}
Group: Amusements/Teaching/Other
Requires: %{name} = %{version}
BuildArch: noarch
%description activities
This package contains the bundle of activities for %{name}.
More than 100 activities are available.
%prep
%autosetup -p1
%build
%cmake_kf6 \
-DBUILD_TESTING=ON \
-DCOMPILE_DOC=ON \
-DQML_BOX2D_MODULE=system \
-DQML_BOX2D_LIBRARY=%{_libdir}/Box2D/libqmlbox2d.so build
%kf6_build
%install
%kf6_install
%find_lang gcompris %{name}.lang --with-qt --with-html --all-name
# Unusual locale length "ca@valencia"
sed -i '/ca@valencia/d' %{name}.lang
%check
export QT_QPA_PLATFORM=offscreen
%ctest
desktop-file-validate --no-hints %{buildroot}%{_kf6_applicationsdir}/%{_name}.desktop
appstream-util validate-relax --nonet %{buildroot}%{_kf6_appstreamdir}/%{_name}.appdata.xml
%files
%doc README.md
%doc %lang(en) %{_kf6_htmldir}/en/*/
%{_kf6_bindir}/%{name}
%{_kf6_applicationsdir}/%{_name}.desktop
%{_kf6_iconsdir}/hicolor/*/apps/%{name}.??g
%{_kf6_appstreamdir}/%{_name}.appdata.xml
%license LICENSES/*
%files activities
%dir %{_kf6_sharedir}/%{name}/
%dir %{_kf6_sharedir}/%{name}/rcc
%{_kf6_sharedir}/%{name}/rcc/*.rcc
%files lang -f %{name}.lang
%dir %{_kf6_sharedir}/%{name}/translations
%{_kf6_sharedir}/%{name}/translations/gcompris*_qt_ca@valencia.qm
%exclude %{_kf6_htmldir}/en/*/
%changelog