Skip to content

Commit

Permalink
Fix pulseaudio module path
Browse files Browse the repository at this point in the history
Take modlibexecdir from pkgconfig, instead of trying to construct it
manually for every distribution.

Fixes QubesOS/qubes-issues#7482
Fixes QubesOS/qubes-issues#7692
  • Loading branch information
marmarek committed Oct 16, 2022
1 parent 62609b5 commit f739fb3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ USRLIBDIR ?= /usr/lib
SYSLIBDIR ?= /lib
DATADIR ?= /usr/share
PA_VER_FULL ?= $(shell pkg-config --modversion libpulse | cut -d "-" -f 1 || echo 0.0)
PA_VER_MAJOR_MINOR ?= $(shell echo $(PA_VER_FULL) | cut -d "." -f 1,2)
PA_VER_MAJOR ?= $(shell echo $(PA_VER_MAJOR_MINOR) | cut -d "." -f 1)
PA_MODULE_DIR ?= $(shell if [ $(PA_VER_MAJOR) -ge 16 ]; then echo pulseaudio; else if [ "$(lsb_release -is)" != "Ubuntu" ]; then echo pulse-$(PA_VER_MAJOR_MINOR); else pulse-$(PA_VER_FULL); fi; fi)
PA_MODULE_DIR ?= $(shell pkg-config --variable=modlibexecdir libpulse)

help:
@echo "Qubes GUI main Makefile:" ;\
Expand Down Expand Up @@ -103,7 +101,7 @@ install-pulseaudio:
install -m 0644 -D pulse/qubes-default.pa \
$(DESTDIR)/etc/pulse/qubes-default.pa
install -D pulse/module-vchan-sink.so \
$(DESTDIR)$(LIBDIR)/$(PA_MODULE_DIR)/modules/module-vchan-sink.so
$(DESTDIR)$(PA_MODULE_DIR)/module-vchan-sink.so
install -m 0644 -D appvm-scripts/etc/tmpfiles.d/qubes-pulseaudio.conf \
$(DESTDIR)/$(USRLIBDIR)/tmpfiles.d/qubes-pulseaudio.conf
install -m 0644 -D appvm-scripts/etc/xdgautostart/qubes-pulseaudio.desktop \
Expand Down
2 changes: 1 addition & 1 deletion debian/pulseaudio-qubes.install
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ etc/pulse/qubes-default.pa
etc/xdg/autostart/qubes-pulseaudio.desktop
usr/bin/start-pulseaudio-with-vchan
usr/lib/pulse-*/modules/module-vchan-sink.so
usr/lib/tmpfiles.d/qubes-pulseaudio.conf
usr/lib/tmpfiles.d/qubes-pulseaudio.conf
6 changes: 2 additions & 4 deletions rpm_spec/gui-agent.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ URL: http://www.qubes-os.org


%define pa_ver_full %((pkg-config --modversion libpulse 2>/dev/null || echo 0.0) | cut -d "-" -f 1)
%define pa_ver_major_minor %((pkg-config --modversion libpulse 2>/dev/null || echo 0.0) | cut -d "-" -f 1 | cut -d "." -f 1,2)
%define pa_ver_major %(echo %{pa_ver_major_minor} | cut -d "." -f 1)
%define pa_module_dir %(if [ %{pa_ver_major} -ge 16 ]; then echo pulseaudio; else echo pulse-%{pa_ver_major_minor}; fi)
%define pa_module_dir %(pkg-config --variable=modlibexecdir libpulse)

BuildRequires: gcc
BuildRequires: libX11-devel
Expand Down Expand Up @@ -204,7 +202,7 @@ rm -f %{name}-%{version}
/usr/lib/tmpfiles.d/qubes-pulseaudio.conf
/etc/pulse/qubes-default.pa
/usr/bin/start-pulseaudio-with-vchan
%{_libdir}/%{pa_module_dir}/modules/module-vchan-sink.so
%{pa_module_dir}/module-vchan-sink.so
/etc/xdg/autostart/qubes-pulseaudio.desktop

%files xfce
Expand Down

0 comments on commit f739fb3

Please sign in to comment.