enable pulseaudio.socket also on update from previous releases [release 15.0-6mamba;Sun Nov 21 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 10:35:07 +01:00
parent daa6896df6
commit 928690bf2e

View File

@ -5,7 +5,7 @@
%define majver %(echo %{version} | cut -d. -f 1-2) %define majver %(echo %{version} | cut -d. -f 1-2)
Name: pulseaudio Name: pulseaudio
Version: 15.0 Version: 15.0
Release: 3mamba Release: 6mamba
Summary: Improved Linux sound server Summary: Improved Linux sound server
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
@ -32,8 +32,6 @@ BuildRequires: libcap-devel
BuildRequires: libdbus-devel BuildRequires: libdbus-devel
BuildRequires: libfftw-devel BuildRequires: libfftw-devel
BuildRequires: libglib-devel BuildRequires: libglib-devel
BuildRequires: libgst-plugins-base-devel
BuildRequires: libgstreamer-devel
BuildRequires: libjack-devel BuildRequires: libjack-devel
BuildRequires: libltdl-devel BuildRequires: libltdl-devel
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
@ -45,7 +43,6 @@ BuildRequires: libspeexdsp-devel
BuildRequires: libsystemd-devel BuildRequires: libsystemd-devel
BuildRequires: libtdb-devel BuildRequires: libtdb-devel
BuildRequires: libudev-devel BuildRequires: libudev-devel
BuildRequires: libwrap-devel
BuildRequires: libxcb-devel BuildRequires: libxcb-devel
BuildRequires: lirc-devel BuildRequires: lirc-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
@ -74,6 +71,7 @@ Requires: rtkit
Requires: udev Requires: udev
Requires(post): /usr/sbin/alternatives Requires(post): /usr/sbin/alternatives
Obsoletes: pulseaudio-esound-compat < 15.0 Obsoletes: pulseaudio-esound-compat < 15.0
Requires: %{name}-utils = %{?epoch:%epoch:}%{version}-%{release}
%description %description
PulseAudio is a sound server for Linux and other Unix like operating systems. It is intended to be an improved drop-in replacement for the Enlightened Sound Daemon (ESOUND). PulseAudio is a sound server for Linux and other Unix like operating systems. It is intended to be an improved drop-in replacement for the Enlightened Sound Daemon (ESOUND).
@ -239,10 +237,16 @@ This contains the static library needed by %{name} based applications.
%prep %prep
%setup -q %setup -q
#-D -T
#%patch0 -p1 #%patch0 -p1
%build %build
#:<< _EOF
%meson \ %meson \
-Dstream-restore-clear-old-devices=true \
-Dbluez5-gstreamer=disabled \
-Delogind=disabled \
-Dtcpwrap=disabled \
-Dsystem_user="pulse" \ -Dsystem_user="pulse" \
-Dsystem_group="pulse" \ -Dsystem_group="pulse" \
-Daccess_group="pulse-access" \ -Daccess_group="pulse-access" \
@ -283,6 +287,20 @@ rm -f %{buildroot}%{_libdir}/*.{a,la}
rm -f %{buildroot}%{_libdir}/pulseaudio/*.{a,la} rm -f %{buildroot}%{_libdir}/pulseaudio/*.{a,la}
rm -f %{buildroot}%{_libdir}/pulse-%{majver}/modules/*.{a,la} rm -f %{buildroot}%{_libdir}/pulse-%{majver}/modules/*.{a,la}
# Superseded by socket activation
sed -e '/autospawn/iautospawn = no' \
-i %{buildroot}%{_sysconfdir}/pulse/client.conf
rm -f %{buildroot}%{_sysconfdir}/dbus-1/system.d/pulseaudio-system.conf
# Disable cork-request module, can result in e.g. media players unpausing
# when there's a Skype call incoming
sed -e 's|/usr/bin/pactl load-module module-x11-cork-request|#&|' \
-i %{buildroot}%{_bindir}/start-pulseaudio-x11
# Required by qpaeq
sed -e '/Load several protocols/aload-module module-dbus-protocol' \
-i %{buildroot}%{_sysconfdir}/pulse/default.pa
%find_lang %{name} %find_lang %{name}
%clean %clean
@ -301,6 +319,11 @@ if [ $1 -ge 1 ]; then
/etc/asound.conf asound.conf /etc/asound.conf.pulseaudio 30 /etc/asound.conf asound.conf /etc/asound.conf.pulseaudio 30
/usr/sbin/alternatives --auto asound.conf /usr/sbin/alternatives --auto asound.conf
fi fi
%systemd_user_post pulseaudio.socket
:
%preun
%systemd_user_preun pulseaudio.socket
: :
%postun %postun
@ -313,6 +336,15 @@ fi
%posttrans %posttrans
sed -i "s|module-gconf|module-gsettings|" %{_sysconfdir}/pulse/default.pa sed -i "s|module-gconf|module-gsettings|" %{_sysconfdir}/pulse/default.pa
sed -i "s|^\(load-module module-rescue-streams\)|#\1|" %{_sysconfdir}/pulse/default.pa sed -i "s|^\(load-module module-rescue-streams\)|#\1|" %{_sysconfdir}/pulse/default.pa
# Superseded by socket activation
sed -e '/autospawn/iautospawn = no' \
-i %{_sysconfdir}/pulse/client.conf
# Required by qpaeq
sed -e '/Load several protocols/aload-module module-dbus-protocol' \
-i %{_sysconfdir}/pulse/default.pa
grep -q default.pa.d %{_sysconfdir}/pulse/default.pa || { grep -q default.pa.d %{_sysconfdir}/pulse/default.pa || {
cat >> %{_sysconfdir}/pulse/default.pa << _EOF cat >> %{_sysconfdir}/pulse/default.pa << _EOF
@ -324,6 +356,11 @@ _EOF
} }
: :
%triggerpostun -- pulseaudio <= 15.0-5mamba
# Enable as socket if coming from older versions
/usr/bin/systemctl --no-reload preset --global pulseaudio.socket
:
%post -n lib%{name}-glib -p /sbin/ldconfig %post -n lib%{name}-glib -p /sbin/ldconfig
%postun -n lib%{name}-glib -p /sbin/ldconfig %postun -n lib%{name}-glib -p /sbin/ldconfig
@ -357,7 +394,6 @@ fi
%config(noreplace) %{_sysconfdir}/pulse/default.pa %config(noreplace) %{_sysconfdir}/pulse/default.pa
%dir %{_sysconfdir}/pulse/default.pa.d %dir %{_sysconfdir}/pulse/default.pa.d
%config(noreplace) %{_sysconfdir}/pulse/system.pa %config(noreplace) %{_sysconfdir}/pulse/system.pa
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/pulseaudio-system.conf
%attr(4755,root,root) %{_bindir}/pulseaudio %attr(4755,root,root) %{_bindir}/pulseaudio
%attr(0700, pulse, pulse) %dir %{_localstatedir}/lib/pulse %attr(0700, pulse, pulse) %dir %{_localstatedir}/lib/pulse
%{_udevrulesdir}/90-pulseaudio.rules %{_udevrulesdir}/90-pulseaudio.rules
@ -530,6 +566,15 @@ fi
#%{_libdir}/pulse-%{majver}/modules/*.a #%{_libdir}/pulse-%{majver}/modules/*.a
%changelog %changelog
* Sun Nov 21 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 15.0-6mamba
- enable pulseaudio.socket also on update from previous releases
* Sun Nov 21 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 15.0-5mamba
- restore gsettings module required by paprefs
* Sat Nov 20 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 15.0-4mamba
- configure for socket activation; add meson options for bluez5-gstreamer and other
* Thu Sep 02 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 15.0-3mamba * Thu Sep 02 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 15.0-3mamba
- update existing default.pa configuration on upgrade - update existing default.pa configuration on upgrade