File kurve.spec of Package kurve
#
# spec file for package kurve
#
# Copyright (c) 2025 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/
#
%global kf6_version 6.0.0
%define pythons python3
%if 0%{?fedora}
%global debug_package %{nil}
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%endif
Name: kurve
Version: 3.2.0
Release: 0%{?dist}
Summary: Audio visualizer widget powered by CAVA for the KDE Plasma Desktop
License: GPL-3.0-only
URL: https://github.com/luisbocanegra/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: cmake >= 3.16
BuildRequires: extra-cmake-modules >= %{kf6_version}
BuildRequires: cmake(Plasma)
%if 0%{?fedora}
BuildRequires: generic-logos
%endif
BuildRequires: python-rpm-macros
BuildRequires: %{python_module websockets}
BuildRequires: cmake(Qt6WebSockets)
Requires: cava
ExclusiveArch: x86_64
%description
Audio visualizer widget powered by CAVA for the KDE Plasma Desktop
%prep
%autosetup -p1 -n %{name}-%{version}
%build
%cmake -DINSTALL_PLASMOID=ON -DBUILD_PLUGIN=ON -S %{_builddir}/%{name}-%{version}
%cmake_build
%install
%cmake_install
sed -Ei "s:^(#!.*)env (python.*)$:\1python3:" %{buildroot}%{_datadir}/plasma/plasmoids/luisbocanegra.audio.visualizer/contents/ui/tools/commandMonitor
chmod +x %{buildroot}%{_datadir}/plasma/plasmoids/luisbocanegra.audio.visualizer/contents/ui/tools/commandMonitor
%files
%doc README.md
%license LICENSE
%{_datadir}/plasma/plasmoids/*
%dir %{_libdir}/qt6/qml/com
%dir %{_libdir}/qt6/qml/com/github
%dir %{_libdir}/qt6/qml/com/github/luisbocanegra
%dir %{_libdir}/qt6/qml/com/github/luisbocanegra/audiovisualizer
%dir %{_libdir}/qt6/qml/com/github/luisbocanegra/audiovisualizer/process
%{_libdir}/qt6/qml/com/github/luisbocanegra/audiovisualizer/process/libprocessplugin.so
%{_libdir}/qt6/qml/com/github/luisbocanegra/audiovisualizer/process/qmldir
%if (0%{?fedora} && 0%{?fedora} < 43) || (0%{?suse_version} && 0%{?suse_version} < 1699)
%{_datadir}/metainfo/*
%endif
%changelog