File pulseaudio-module-xrdp.spec of Package pulseaudio-module-xrdp
#
# spec file for package pulseaudio-module-xrdp
#
# Copyright (c) 2023 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/
#
# openSUSE_Tumbleweed And Leap 15.6
%if 0%{?suse_version} > 1600 || 0%{?sle_version} == 150600 && 0%{?is_opensuse}
%define pulse_version 17.0
# PulseAudio modules libdir name
%define pulse_lib_name pulseaudio
%endif
# openSUSE Leap 15.5 | 15.4
%if 0%{?sle_version} == 150500 && 0%{?is_opensuse} || 0%{?sle_version} == 150400 && 0%{?is_opensuse}
%define pulse_version 15.0
# PulseAudio modules libdir name
%define pulse_lib_name pulse-%{pulse_version}
%endif
Name: pulseaudio-module-xrdp
Version: 0.7
Release: 0
Summary: PulseAudio module which enables xrdp to use audio redirection
License: LGPL-2.1-only
Requires: pulseaudio >= %{pulse_version}
Group: System/Sound Daemons
URL: https://github.com/neutrinolabs/pulseaudio-module-xrdp
Source0: %{name}-%{version}.tar.gz
Source1: pulseaudio-%{pulse_version}.tar.xz
Patch1001: pulse_dir_build_path.patch
# PulseAudio dependencies
BuildRequires: meson
BuildRequires: gcc-c++
BuildRequires: libgiomm-2_4-1
BuildRequires: libtdb-devel
BuildRequires: libtool
# BuildRequires: gio-sharp-devel
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: alsa-devel
BuildRequires: check-devel
BuildRequires: dbus-1-devel
BuildRequires: doxygen
BuildRequires: libgudev-1_0-devel
BuildRequires: libopenssl-devel
BuildRequires: libsndfile-devel
BuildRequires: speex-devel
# pulseaudio-module-xrdp dependencies
BuildRequires: libpulse-devel
Requires: xrdp
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
xrdp implements Audio Output redirection using PulseAudio,
which is a sound system used on POSIX operating systems.
The server to client audio redirection is implemented as per
Remote Desktop Protocol: Audio Output Virtual
Channel Extension [MS-RDPEA] specs,
which means it is interoperable with any
RDP client which implements it
(most of them including: MS RDP clients, FreeRDP).
The client to server audio redirection is implemented as per
Remote Desktop Protocol: Audio Input Redirection Virtual
Channel Extension [MS-RDPEAI] which means it is interoperable
with any RDP client which implements it
(most of them including: MS RDP clients, FreeRDP).
%prep
%setup -q
%autopatch -p1
%build
cd %{_builddir} && \
tar -xf %{SOURCE1} && \
cd pulseaudio-%{pulse_version} && \
meson build && \
cd %{_builddir}/%{name}-%{version} && \
sh ./bootstrap
%configure \
PULSE_DIR=%{_builddir}/pulseaudio-%{pulse_version}
make %{?_smp_mflags} V=1
%install
%make_install
find %{buildroot} -name "*.la" -delete
%files
%defattr(-,root,root)
%license LICENSE
%doc README.md
%dir %{_libdir}/%{pulse_lib_name}
%dir %{_libdir}/%{pulse_lib_name}/modules
%{_libdir}/%{pulse_lib_name}/modules/module-xrdp-sink.so
%{_libdir}/%{pulse_lib_name}/modules/module-xrdp-source.so
%dir %{_libexecdir}/pulseaudio-module-xrdp
%{_libexecdir}/pulseaudio-module-xrdp/load_pa_modules.sh
%config %{_sysconfdir}/xdg/autostart/pulseaudio-xrdp.desktop
%changelog