From ed21ea976cde719b5d3a33b0855968e81d529b2a Mon Sep 17 00:00:00 2001 From: Jaska Uimonen Date: Thu, 23 Oct 2014 09:50:21 +0300 Subject: [PATCH] add systemd socket activation files to spec Change-Id: Ia7341844fc0be2f9449e306470b05a3653c3eee9 --- packaging/pulseaudio.spec | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packaging/pulseaudio.spec b/packaging/pulseaudio.spec index 10b8d8d..f118632 100644 --- a/packaging/pulseaudio.spec +++ b/packaging/pulseaudio.spec @@ -269,7 +269,19 @@ fdupes %{buildroot}%{_includedir} rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/pulseaudio/*.la -%post -p /sbin/ldconfig +%post +/sbin/ldconfig +if [ $1 -eq 1 ] ; then +# Initial installation +systemctl --user --global preset pulseaudio.socket >/dev/null 2>&1 || : +fi + +%preun +if [ $1 -eq 0 ] ; then +# Package removal, not upgrade +systemctl --no-reload --user --global disable pulseaudio.socket > /dev/null 2>&1 || : +fi + %postun -p /sbin/ldconfig %post -n libpulse -p /sbin/ldconfig @@ -364,6 +376,8 @@ rm -f %{buildroot}%{_libdir}/pulseaudio/*.la %{_libdir}/pulse-%{version}/modules/module-virtual-surround-sink.so %{_libdir}/pulse-%{version}/modules/module-role-ducking.so %{_libdir}/pulse-%{version}/modules/module-systemd-login.so +%{_unitdir_user}/pulseaudio.service +%{_unitdir_user}/pulseaudio.socket %if %{with pulseaudio_samsung_policy} %{_libdir}/pulse-%{version}/modules/module-policy.so %endif -- 2.7.4