%define api 0.5 %define major 0 # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %define libname %mklibname wireplumber %{major} %define girname %mklibname wireplumber-gir %{api} %define devname %mklibname wireplumber -d %bcond_without introspection Name: wireplumber Version: 0.5.7 Release: %mkrel 1 Summary: A modular session/policy manager for PipeWire Group: Sound/Mixers License: MIT URL: https://pipewire.pages.freedesktop.org/wireplumber/ Source0: https://gitlab.freedesktop.org/pipewire/%{name}/-/archive/%{version}/%{name}-%{version}.tar.bz2 ## upstream patches ## upstreamable patches ## fedora patches BuildRequires: gettext BuildRequires: meson BuildRequires: gcc BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gmodule-2.0) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(libspa-0.2) >= 0.2 BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.26 BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(lua) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: python3-lxml BuildRequires: python-sphinx BuildRequires: doxygen %{?systemd_ordering} # Make sure that we have -libs package in the same version Requires: %{libname}%{?_isa} = %{version}-%{release} Provides: pipewire-session-manager Conflicts: pipewire-session-manager %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. %package -n %libname Summary: Libraries for WirePlumber clients Group: System/Libraries Recommends: %{name}%{?_isa} = %{version}-%{release} %description -n %libname This package contains the runtime libraries for any application that wishes to interface with WirePlumber. %if %with introspection %package -n %girname Summary: GObject Introspection interface description for WirePlumber Group: System/Libraries Requires: %{libname}%{?_isa} = %{version}-%{release} %description -n %girname GObject Introspection interface description for WirePlumber. %endif %package -n %devname Summary: Development files for %{name} Group: Development/C++ Requires: %{name}%{?_isa} = %{version}-%{release} %if %with introspection Requires: %{girname} = %{version}-%{release} %endif Requires: %{libname}%{?_isa} = %{version}-%{release} %description -n %devname The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %autosetup -p1 %build %meson -Dsystem-lua=true \ -Ddoc=disabled \ -Dsystemd=enabled \ -Dsystemd-user-service=true \ %if %with introspection -Dintrospection=enabled \ %else -Dintrospection=disabled \ %endif -Delogind=disabled %meson_build %install %meson_install # Create local config skeleton mkdir -p %{buildroot}%{_sysconfdir}/wireplumber/{bluetooth.lua.d,common,main.lua.d,policy.lua.d} %find_lang %{name} %posttrans %systemd_user_post %{name}.service %preun %systemd_user_preun %{name}.service %triggerun -- fedora-release < 35 # When upgrading to Fedora Linux 35, transition to WirePlumber by default if [ -x "/bin/systemctl" ]; then /bin/systemctl --no-reload preset --global %{name}.service || : fi %files -f %{name}.lang %license LICENSE %doc %{_docdir}/wireplumber/examples/ %{_bindir}/wireplumber %{_bindir}/wpctl %{_bindir}/wpexec %dir %{_sysconfdir}/wireplumber %dir %{_sysconfdir}/wireplumber/bluetooth.lua.d %dir %{_sysconfdir}/wireplumber/common %dir %{_sysconfdir}/wireplumber/main.lua.d %dir %{_sysconfdir}/wireplumber/policy.lua.d %{_datadir}/wireplumber/ %{_datadir}/zsh/site-functions/_wpctl %{_userunitdir}/wireplumber.service %{_userunitdir}/wireplumber@.service %files -n %libname %license LICENSE %dir %{_libdir}/wireplumber-%{api}/ %{_libdir}/wireplumber-%{api}/libwireplumber-*.so %{_libdir}/libwireplumber-%{api}.so.%{major}{,.*} %if %with introspection %files -n %girname %license LICENSE %{_libdir}/girepository-1.0/Wp-%{api}.typelib %endif %files -n %devname %{_includedir}/wireplumber-%{api}/ %{_libdir}/libwireplumber-%{api}.so %{_libdir}/pkgconfig/wireplumber-%{api}.pc %if %with introspection %{_datadir}/gir-1.0/Wp-%{api}.gir %endif