Update kf6-knotifications.spec

This commit is contained in:
2026-02-11 22:52:46 +08:00
parent 6c5df9f204
commit e6f28a5360

View File

@@ -8,13 +8,6 @@
%define rname knotifications
%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}}
@@ -26,6 +19,7 @@ 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: pkgconfig
@@ -40,17 +34,14 @@ BuildRequires: pkgconfig(libcanberra)
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: pkgconfig(python3)
BuildRequires: python3-devel
BuildRequires: python3-build
BuildRequires: python3-setuptools
BuildRequires: python3-wheel
BuildRequires: clang-devel
BuildRequires: cmake(Shiboken6)
BuildRequires: cmake(PySide6)
%endif
# /SECTION
%description
KNotification is used to notify the user of an event. It covers feedback and
@@ -77,25 +68,22 @@ Requires: cmake(Qt6Widgets) >= %{qt6_version}
KNotification is used to notify the user of an event. It covers feedback and
persistent events. Development files.
%if %{with kde_python_bindings}
%package -n python3-kf6-knotifications
Summary: Python interface for kf6-knotifications
%package -n python3-%{name}
Summary: Qt for Python bindings for %{name}
Provides: python3-%{name}
%python_provide python3-%{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-kf6-knotifications
This package provides a python interface for kf6-knotifications.
%endif
%description -n python3-%{name}
The package contains the PySide6 bindings library for %{name}.
%prep
%autosetup -p1 -n %{rname}-%{version}
%build
%cmake_kf6 \
%if %{with kde_python_bindings}
-DPython_EXECUTABLE:STRING=%{__mypython}
%else
-DBUILD_PYTHON_BINDINGS=OFF
%endif
%{nil}
-DPython_EXECUTABLE:STRING=%{__python3} \
-DBUILD_PYTHON_BINDINGS=ON
%kf6_build
@@ -120,10 +108,8 @@ This package provides a python interface for kf6-knotifications.
%{_kf6_includedir}/KNotifications/
%{_kf6_libdir}/libKF6Notifications.so
%if %{with kde_python_bindings}
%files -n python3-kf6-knotifications
%{mypython_sitearch}/*.so
%endif
%files -n python3-%{name}
%{python3_sitearch}/*.so
%changelog
%{?autochangelog}