146 lines
4.3 KiB
RPMSpec
146 lines
4.3 KiB
RPMSpec
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
|
|
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
|
|
# SPDX-FileContributor: jingyupu <pujingyu@iscas.ac.cn>
|
|
#
|
|
# SPDX-License-Identifier: MulanPSL-2.0
|
|
|
|
%define qt6_version 6.8.0
|
|
|
|
%define rname kcoreaddons
|
|
|
|
%bcond_with kde_python_bindings
|
|
%if %{with kde_python_bindings}
|
|
%global mypython python3
|
|
%global __mypython %{expand:%%__python3}
|
|
%global mypython_sitearch %{python3_sitearch}
|
|
%endif
|
|
|
|
# Full KF6 version (e.g. 6.21.0)
|
|
%{!?_kf6_version: %global _kf6_version %{version}}
|
|
|
|
Name: kf6-kcoreaddons
|
|
Version: 6.22.0
|
|
Release: %autorelease
|
|
Summary: Utilities for core application functionality and accessing the OS
|
|
License: LGPL-2.1-or-later
|
|
URL: https://www.kde.org
|
|
#!RemoteAsset
|
|
Source: https://download.kde.org/stable/frameworks/6.22/%{rname}-%{version}.tar.xz
|
|
|
|
BuildRequires: fdupes
|
|
BuildRequires: kf6-extra-cmake-modules >= %{_kf6_version}
|
|
BuildRequires: shared-mime-info
|
|
BuildRequires: cmake(Qt6Core) >= %{qt6_version}
|
|
BuildRequires: cmake(Qt6DBus) >= %{qt6_version}
|
|
BuildRequires: cmake(Qt6Gui) >= %{qt6_version}
|
|
BuildRequires: cmake(Qt6LinguistTools) >= %{qt6_version}
|
|
BuildRequires: cmake(Qt6Qml) >= %{qt6_version}
|
|
BuildRequires: cmake(Qt6QuickTest) >= %{qt6_version}
|
|
BuildRequires: cmake(Qt6ToolsTools) >= %{qt6_version}
|
|
BuildRequires: qt6-tools
|
|
BuildRequires: qt6-doctools
|
|
BuildRequires: qt6-linguist
|
|
# SECTION bindings
|
|
%if %{with kde_python_bindings}
|
|
BuildRequires: python3 >= 3.9
|
|
BuildRequires: pkgconfig(python3) >= 3.9
|
|
BuildRequires: python3-build
|
|
BuildRequires: %{mypython}-build
|
|
BuildRequires: %{mypython}-devel >= 3.9
|
|
BuildRequires: %{mypython}-setuptools
|
|
BuildRequires: %{mypython}-wheel
|
|
BuildRequires: cmake(Shiboken6)
|
|
BuildRequires: cmake(PySide6)
|
|
%endif
|
|
# /SECTION
|
|
Requires: shared-mime-info >= 1.8
|
|
|
|
%description
|
|
KCoreAddons provides classes built on top of QtCore to perform various tasks
|
|
such as manipulating mime types, autosaving files, creating backup files,
|
|
generating random sequences, performing text manipulations such as macro
|
|
replacement, accessing user information and many more.
|
|
|
|
%package imports
|
|
Summary: QML imports for kcoreaddons
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description imports
|
|
QML imports for kcoreaddons.
|
|
|
|
%package devel
|
|
Summary: Utilities for core application functionality and accessing the OS
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description devel
|
|
KCoreAddons provides classes built on top of QtCore to perform various tasks
|
|
such as manipulating mime types, autosaving files, creating backup files,
|
|
generating random sequences, performing text manipulations such as macro
|
|
replacement, accessing user information and many more. Development files.
|
|
|
|
%if %{with kde_python_bindings}
|
|
%package -n python3-kf6-kcoreaddons
|
|
Summary: Python bindings for kf6-kcoreaddons
|
|
|
|
%description -n python3-kf6-kcoreaddons
|
|
This package provides Python bindings for kf6-kcoreaddons.
|
|
%endif
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{rname}-%{version}
|
|
|
|
%build
|
|
# ENABLE_PCH breaks the build locally with 'error: is pie differs in PCH file vs. current file'
|
|
%cmake_kf6 \
|
|
-DENABLE_PCH:BOOL=FALSE \
|
|
%if %{with kde_python_bindings}
|
|
-DPython_EXECUTABLE:STRING=%{__mypython} \
|
|
-DBUILD_PYTHON_BINDINGS:BOOL=ON \
|
|
%else
|
|
-DBUILD_PYTHON_BINDINGS:BOOL=OFF \
|
|
-DBUILD_QCH:BOOL=OFF \
|
|
-DKCOREADDONS_BUILD_PYTHON_DOCS:BOOL=OFF \
|
|
%endif
|
|
%{nil}
|
|
|
|
%kf6_build
|
|
|
|
%install
|
|
%kf6_install
|
|
|
|
%fdupes %{buildroot}
|
|
|
|
%files
|
|
%license LICENSES/*
|
|
%doc README.md
|
|
%{_kf6_appsdir}/mime/packages/kde6.xml
|
|
%{_kf6_debugdir}/kcoreaddons.categories
|
|
%{_kf6_debugdir}/kcoreaddons.renamecategories
|
|
%{_kf6_libdir}/libKF6CoreAddons.so.*
|
|
%{_datadir}/locale/*/LC_MESSAGES/kcoreaddons6_qt.qm
|
|
|
|
%files imports
|
|
%{_kf6_qmldir}/org/kde/coreaddons/
|
|
|
|
%files devel
|
|
%{_kf6_includedir}/KCoreAddons/
|
|
%{_kf6_cmakedir}/KF6CoreAddons/
|
|
%dir %{_kf6_datadir}/jsonschema
|
|
%{_kf6_datadir}/jsonschema/kpluginmetadata.schema.json
|
|
%{_kf6_libdir}/libKF6CoreAddons.so
|
|
%{_kf6_pkgconfigdir}/KF6CoreAddons.pc
|
|
%if %{with kde_python_bindings}
|
|
%dir %{_includedir}/PySide6/
|
|
%{_includedir}/PySide6/KCoreAddons/
|
|
%endif
|
|
|
|
|
|
%if %{with kde_python_bindings}
|
|
%files -n python3-kf6-kcoreaddons
|
|
%{mypython_sitearch}/*.so
|
|
%{_kf6_sharedir}/PySide6/typesystems/typesystem_kcoreaddons.xml
|
|
%endif
|
|
|
|
%changelog
|
|
%{?autochangelog}
|