SHA256
1
0
forked from pool/wireplumber
wireplumber/wireplumber.spec

264 lines
8.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package wireplumber
#
# Copyright (c) 2022 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/
#
Accepting request 1128888 from home:alarrosa:branches:multimedia:libs - Update to version 0.4.16: * Additions: - Added a new "sm-objects" script that allows loading objects on demand via metadata entries that describe the object to load; this can be used to load pipewire modules, such as filters or network sources/sinks, on demand - Added a mechanism to override device profile priorities in the configuration, mainly as a way to re-prioritize Bluetooth codecs, but this also can be used for other devices - Added a mechanism in the endpoints policy to allow connecting filters between a certain endpoint's virtual sink and the device sink; this is specifically intended to allow plugging a filter-chain to act as equalizer on the Multimedia endpoint - Added wp_core_get_own_bound_id() method in WpCore * Changes: - PipeWire 0.3.68 is now required - policy-dsp now has the ability to hide hardware nodes behind the DSP sink to prevent hardware misuse or damage - JSON parsing in Lua now allows keys inside objects to be without quotes - Added optional argument in the Lua JSON parse() method to limit recursions, making it possible to partially parse a JSON object - It is now possible to pass nil in Lua object constructors that expect an optional properties object; previously, omitting the argument was the only way to skip the properties - The endpoints policy now marks the endpoint nodes as "passive" instead of marking their links, adjusting for the behavior change in PipeWire 0.3.68 - Removed the "passive" property from si-standard-link, since OBS-URL: https://build.opensuse.org/request/show/1128888 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=63
2023-11-26 12:24:38 +01:00
%define pipewire_minimum_version 0.3.68
%define apiver 0.4
%define apiver_str 0_4
%define sover 0
%define libwireplumber libwireplumber-%{apiver_str}-%{sover}
Name: wireplumber
Version: 0.4.17
Release: 0
Summary: Session / policy manager implementation for PipeWire
License: MIT
Group: Development/Libraries/C and C++
URL: https://gitlab.freedesktop.org/pipewire/wireplumber
2021-10-19 10:38:02 +02:00
Source0: wireplumber-%{version}.tar.xz
Source1: split-config-file.py
# FIX-PATCH-SUSE fix-bsc1219411.patch alarrosa@suse.com -- Enable bluetooth only when audio support is enabled
Patch0: fix-bsc1219411.patch
# docs
BuildRequires: doxygen
BuildRequires: graphviz
# /docs
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: meson >= 0.59.0
BuildRequires: pipewire >= %{pipewire_minimum_version}
BuildRequires: pipewire-spa-plugins-0_2 >= %{pipewire_minimum_version}
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: python3-lxml
BuildRequires: xmltoman
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(gio-unix-2.0)
2021-07-13 08:33:19 +02:00
BuildRequires: pkgconfig(glib-2.0) >= 2.62.0
BuildRequires: pkgconfig(gmodule-2.0)
2021-07-13 08:33:19 +02:00
BuildRequires: pkgconfig(gobject-2.0) >= 2.62
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(libpipewire-0.3) >= %{pipewire_minimum_version}
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(lua)
BuildRequires: pkgconfig(systemd)
#!BuildIgnore: pipewire-session-manager
# Setup ALSA devices if PipeWire handles PulseAudio or JACK connections.
Requires: (%{name}-audio if (pipewire-pulseaudio or pipewire-jack))
Requires: pipewire >= %{pipewire_minimum_version}
Provides: pipewire-session-manager
%if 0%{?suse_version} <= 1500
BuildRequires: gcc9
BuildRequires: gcc9-c++
%else
BuildRequires: gcc-c++
%endif
%{?systemd_ordering}
%description
WirePlumber is a modular session / policy manager for PipeWire and
a GObject-based high-level library that wraps PipeWire's API,
providing convenience for writing the daemon's modules as well as
external tools for managing PipeWire.
%lang_package
%package audio
Summary: Session / policy manager implementation for PipeWire (audio support)
Group: Development/Libraries/C and C++
Requires: %{libwireplumber} = %{version}
Requires: %{name} = %{version}
Recommends: pipewire-jack
Recommends: pipewire-pulseaudio
Conflicts: pulseaudio
BuildArch: noarch
%description audio
WirePlumber is a modular session / policy manager for PipeWire and
a GObject-based high-level library that wraps PipeWire's API,
providing convenience for writing the daemon's modules as well as
external tools for managing PipeWire.
This package enables the use of alsa devices in PipeWire.
%package devel
Summary: Session / policy manager implementation for PipeWire
Group: Development/Libraries/C and C++
2021-10-19 10:38:02 +02:00
Requires: %{libwireplumber} = %{version}
Requires: %{name} = %{version}
%description devel
WirePlumber is a modular session / policy manager for PipeWire and
a GObject-based high-level library that wraps PipeWire's API,
providing convenience for writing the daemon's modules as well as
external tools for managing PipeWire.
This package provides all the necessary files for development with WirePlumber
%package -n %{libwireplumber}
Summary: Session / policy manager implementation for PipeWire
Group: System/Libraries
%description -n %{libwireplumber}
WirePlumber is a modular session / policy manager for PipeWire and
a GObject-based high-level library that wraps PipeWire's API,
providing convenience for writing the daemon's modules as well as
external tools for managing PipeWire.
This package provides the wireplumber shared library.
%package -n typelib-1_0-Wp-%{apiver_str}
Summary: Introspection bindings for libwireplumber
Group: System/Libraries
%description -n typelib-1_0-Wp-%{apiver_str}
WirePlumber is a modular session / policy manager for PipeWire and
a GObject-based high-level library that wraps PipeWire's API,
providing convenience for writing the daemon's modules as well as
external tools for managing PipeWire.
This package provides the GObject Introspection bindings for
the wireplumber shared library.
Accepting request 1117592 from home:alarrosa:branches:multimedia:libs - Update to version 0.4.15: * Additions: - A new "DSP policy" module has been added; its purpose is to automatically load a filter-chain when a certain hardware device is present, so that audio always goes through this software DSP before reaching the device. This is mainly to support Apple M1/M2 devices, which require a software DSP to be always present - WpImplModule now supports loading module arguments directly from a SPA-JSON config file; this is mainly to support DSP configuration for Apple M1/M2 and will likely be reworked for 0.5 - Added support for automatically combining Bluetooth LE Audio device sets (e.g. pairs of earbuds) (!500) - Added command line options in wpctl to display device/node names and nicknames instead of descriptions - Added zsh completions file for wpctl - The device profile selection policy now respects the device.profile property if it is set on the device; this is useful to hand-pick a profile based on static configuration rules (alsa_monitor.rules) * Changes/Fixes: - Linking policy now sends an error to the client before destroying the node, if it determines that the node cannot be linked to any target; this fixes error reporting on the client side - Fixed a crash in suspend-node that could happen when destroying virtual sinks that were loaded from another process such as pw-loopback - Virtual machine default period size has been bumped to 1024 OBS-URL: https://build.opensuse.org/request/show/1117592 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=60
2023-10-13 09:38:22 +02:00
%package zsh-completion
Summary: Wireplumber zsh completion
Group: System/Shells
Requires: %{name} = %{version}
Requires: zsh
Supplements: (wireplumber and zsh)
%description zsh-completion
Optional dependency offering zsh completion for various wpctl parameters.
%prep
%autosetup -p1
pushd src/config/main.lua.d
python3 %{SOURCE1}
rm 90-enable-all.lua
popd
%build
%if %{pkg_vcmp gcc < 8}
export CC=gcc-9
export CXX=g++-9
%endif
2021-10-19 10:38:02 +02:00
%meson -Ddoc=disabled \
-Dsystem-lua=true \
-Delogind=disabled
%meson_build
%install
%meson_install
%fdupes -s %{buildroot}/%{_datadir}/doc/pipewire/html
%find_lang %{name} %{?no_lang_C}
%ifnarch %ix86 ppc64
%check
export XDG_RUNTIME_DIR=/tmp
%meson_test
%endif
%pre
%systemd_user_pre wireplumber.service
%post
%systemd_user_post wireplumber.service
%if 0%{?suse_version} <= 1500
# If the pipewire.socket user unit is not enabled and the workaround
# for boo#1186561 has never been executed, we need to execute it now
if [ ! -L %{_sysconfdir}/systemd/user/pipewire.service.wants/wireplumber.service \
-a ! -f %{_localstatedir}/lib/pipewire/wireplumber_post_workaround \
-a -x %{_bindir}/systemctl ]; then
for service in wireplumber.service ; do
%{_bindir}/systemctl --global preset "$service" || :
done
mkdir -p %{_localstatedir}/lib/pipewire
cat << EOF > %{_localstatedir}/lib/pipewire/wireplumber_post_workaround
# The existence of this file means that the wireplumber user services were
# enabled at least once. Please don't remove this file as that would
# make the services to be enabled again in the next package update.
#
# Check the following bugs for more information:
# https://bugzilla.opensuse.org/show_bug.cgi?id=1200485
EOF
fi
%endif
%preun
%systemd_user_preun wireplumber.service
%postun
%systemd_user_postun wireplumber.service
%post -n %{libwireplumber} -p /sbin/ldconfig
%postun -n %{libwireplumber} -p /sbin/ldconfig
%files
%{_bindir}/wireplumber
%{_bindir}/wpctl
%{_bindir}/wpexec
%dir %{_libdir}/wireplumber-%{apiver}
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-default-nodes-api.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-default-nodes.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-default-profile.so
2021-10-19 10:38:02 +02:00
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-file-monitor-api.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-logind.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-lua-scripting.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-metadata.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-mixer-api.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-portal-permissionstore.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-reserve-device.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-si-audio-adapter.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-si-audio-endpoint.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-si-node.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-si-standard-link.so
%{_userunitdir}/wireplumber.service
%{_userunitdir}/wireplumber@.service
%{_datadir}/wireplumber
%exclude %{_datadir}/wireplumber/main.lua.d/90-2-1-enable-alsa.lua
%exclude %{_datadir}/wireplumber/bluetooth.lua.d/90-enable-all.lua
%files lang -f %{name}.lang
%files audio
%{_datadir}/wireplumber/main.lua.d/90-2-1-enable-alsa.lua
%{_datadir}/wireplumber/bluetooth.lua.d/90-enable-all.lua
%files devel
%{_includedir}/wireplumber-%{apiver}
%{_libdir}/libwireplumber-%{apiver}.so
%{_libdir}/pkgconfig/wireplumber-%{apiver}.pc
%{_datadir}/gir-1.0/Wp-%{apiver}.gir
%files -n typelib-1_0-Wp-%{apiver_str}
%{_libdir}/girepository-1.0/Wp-%{apiver}.typelib
%files -n %{libwireplumber}
%{_libdir}/libwireplumber-%{apiver}.so.%{sover}
%{_libdir}/libwireplumber-%{apiver}.so.%{sover}.*
Accepting request 1117592 from home:alarrosa:branches:multimedia:libs - Update to version 0.4.15: * Additions: - A new "DSP policy" module has been added; its purpose is to automatically load a filter-chain when a certain hardware device is present, so that audio always goes through this software DSP before reaching the device. This is mainly to support Apple M1/M2 devices, which require a software DSP to be always present - WpImplModule now supports loading module arguments directly from a SPA-JSON config file; this is mainly to support DSP configuration for Apple M1/M2 and will likely be reworked for 0.5 - Added support for automatically combining Bluetooth LE Audio device sets (e.g. pairs of earbuds) (!500) - Added command line options in wpctl to display device/node names and nicknames instead of descriptions - Added zsh completions file for wpctl - The device profile selection policy now respects the device.profile property if it is set on the device; this is useful to hand-pick a profile based on static configuration rules (alsa_monitor.rules) * Changes/Fixes: - Linking policy now sends an error to the client before destroying the node, if it determines that the node cannot be linked to any target; this fixes error reporting on the client side - Fixed a crash in suspend-node that could happen when destroying virtual sinks that were loaded from another process such as pw-loopback - Virtual machine default period size has been bumped to 1024 OBS-URL: https://build.opensuse.org/request/show/1117592 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=60
2023-10-13 09:38:22 +02:00
%files zsh-completion
%dir %{_datarootdir}/zsh
%dir %{_datarootdir}/zsh/site-functions/
%{_datarootdir}/zsh/site-functions/_wpctl
%changelog