forked from pool/apulse
- Update to version 0.1.12.
- Rewrite /usr/bin/apulse. OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/apulse?expand=0&rev=21
This commit is contained in:
parent
425afbc44c
commit
8bd3253381
9
apulse
9
apulse
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f '/etc/apulse.conf' -a -r '/etc/apulse.conf' ] && . '/etc/apulse.conf';
|
||||
[ -f $HOME'/.apulse.conf' -a -r $HOME'/.apulse.conf' ] && . $HOME'/.apulse.conf';
|
||||
|
||||
APULSE_CAPTURE_DEVICE=${APULSE_CAPTURE_DEVICE:='plughw:0,0'};
|
||||
APULSE_PLAYBACK_DEVICE=${APULSE_PLAYBACK_DEVICE:='default'};
|
||||
|
||||
LD_LIBRARY_PATH='/usr/$LIB/apulse'${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} APULSE_CAPTURE_DEVICE="$APULSE_CAPTURE_DEVICE" APULSE_PLAYBACK_DEVICE="$APULSE_PLAYBACK_DEVICE" "$@";
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4f8aa9059d07bac1006e920a4a6b875ad63fdde973b83c138507812c00dd5cd6
|
||||
size 110272
|
3
apulse-0.1.12.tar.gz
Normal file
3
apulse-0.1.12.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cfcadfe971abd785ed3ca24e576fcbaade185525c1eda76daf32dbf298e52892
|
||||
size 117220
|
16
apulse-fix-pulse-12.patch
Normal file
16
apulse-fix-pulse-12.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- a/src/apulse-volume.c
|
||||
+++ b/src/apulse-volume.c
|
||||
@@ -282,8 +282,13 @@ pa_cvolume_scale(pa_cvolume *v, pa_volum
|
||||
|
||||
APULSE_EXPORT
|
||||
pa_cvolume *
|
||||
+#if PA_CHECK_VERSION(11, 99, 0)
|
||||
+pa_cvolume_scale_mask(pa_cvolume *v, pa_volume_t max, const pa_channel_map *cm,
|
||||
+ pa_channel_position_mask_t mask)
|
||||
+#else
|
||||
pa_cvolume_scale_mask(pa_cvolume *v, pa_volume_t max, pa_channel_map *cm,
|
||||
pa_channel_position_mask_t mask)
|
||||
+#endif
|
||||
{
|
||||
trace_info_z("Z %s\n", __func__);
|
||||
return NULL;
|
@ -1,13 +0,0 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -60,8 +60,8 @@ set_target_properties(pulse-simple PROPE
|
||||
|
||||
set(SYMBOLMAP "-Wl,-version-script=\"${CMAKE_SOURCE_DIR}/src/symbolmap\"")
|
||||
|
||||
-target_link_libraries(pulse ${SYMBOLMAP} trace-helper ${REQ_LIBRARIES})
|
||||
-target_link_libraries(pulse-simple ${SYMBOLMAP} trace-helper ${REQ_LIBRARIES})
|
||||
+target_link_libraries(pulse ${SYMBOLMAP} trace-helper m ${REQ_LIBRARIES})
|
||||
+target_link_libraries(pulse-simple ${SYMBOLMAP} trace-helper m ${REQ_LIBRARIES})
|
||||
target_link_libraries(pulsecommon-5.0 ${SYMBOLMAP} trace-helper ${REQ_LIBRARIES})
|
||||
|
||||
add_subdirectory(tests)
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 16 15:48:41 UTC 2018 - sor.alexei@meowr.ru
|
||||
|
||||
- Update to version 0.1.12 (changes since 0.1.10):
|
||||
* Implement new, free, and write functions of the pa_simple_*
|
||||
family.
|
||||
* Add some documentation about issues related to sandboxing.
|
||||
* Drop the libpulsecommon-5.0.so binary.
|
||||
* Add stub functions for the mainloop-glib interface.
|
||||
* add a man- page.
|
||||
* Cosmetic code changes.
|
||||
* Misc compatibility fixes.
|
||||
- Add apulse-fix-pulse-12.patch sor.alexei@meowr.ru: Fix
|
||||
PulseAudio 12+ compatibility.
|
||||
- Remove apulse-link-math.patch.
|
||||
- Use %cmake_install.
|
||||
- Rewrite the apulse script in Python 3 to avoid insecure config
|
||||
reading from home. The apulse.conf format was changed, and the
|
||||
user config also was moved from ~/.apulse.conf to
|
||||
$XDG_CONFIG_HOME/apulse.conf.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 12 17:50:15 UTC 2018 - ilya@ilya.pp.ua
|
||||
|
||||
|
@ -1,2 +1,6 @@
|
||||
APULSE_CAPTURE_DEVICE=${APULSE_CAPTURE_DEVICE:='plughw:0,0'};
|
||||
APULSE_PLAYBACK_DEVICE=${APULSE_PLAYBACK_DEVICE:='default'};
|
||||
# This file is part of the apulse package.
|
||||
#
|
||||
# User-specific configuration can go to ~/.config/apulse.conf
|
||||
|
||||
; playback-device = default
|
||||
capture-device = plughw:0,0
|
||||
|
31
apulse.py
Normal file
31
apulse.py
Normal file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/python3
|
||||
import configparser
|
||||
import itertools
|
||||
import os
|
||||
import sys
|
||||
|
||||
xdg_config_home = os.environ.get("XDG_CONFIG_HOME",
|
||||
os.path.expanduser("~/.config"))
|
||||
proc_env = os.environ
|
||||
conf_parser = configparser.SafeConfigParser()
|
||||
|
||||
for conf_file in ("/etc/apulse.conf",
|
||||
os.path.join(xdg_config_home, "apulse.conf")):
|
||||
if os.access(conf_file, os.R_OK):
|
||||
with open(conf_file, "r") as conf:
|
||||
conf = itertools.chain(("[0]",), conf)
|
||||
conf_parser.read_file(conf)
|
||||
|
||||
playback_device = conf_parser.get("0", "playback-device", fallback="default")
|
||||
capture_device = conf_parser.get("0", "capture-device", fallback="default")
|
||||
|
||||
if "APULSE_PLAYBACK_DEVICE" not in proc_env:
|
||||
proc_env["APULSE_PLAYBACK_DEVICE"] = playback_device
|
||||
if "APULSE_CAPTURE_DEVICE" not in proc_env:
|
||||
proc_env["APULSE_CAPTURE_DEVICE"] = capture_device
|
||||
|
||||
ld_libpath = os.environ.get("LD_LIBRARY_PATH", "")
|
||||
proc_env["LD_LIBRARY_PATH"] = "/usr/$LIB/apulse" + \
|
||||
(":" if ld_libpath else "") + ld_libpath
|
||||
|
||||
os.execvpe(sys.argv[1], sys.argv[1:], proc_env)
|
41
apulse.spec
41
apulse.spec
@ -12,12 +12,13 @@
|
||||
# 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
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define __provides_exclude_from ^%{_libdir}/apulse/.*.so.*$
|
||||
Name: apulse
|
||||
Version: 0.1.10
|
||||
Version: 0.1.12
|
||||
Release: 0
|
||||
Summary: PulseAudio emulation for ALSA
|
||||
License: MIT
|
||||
@ -25,10 +26,10 @@ Group: System/Libraries
|
||||
URL: https://github.com/i-rinat/apulse
|
||||
Source0: https://github.com/i-rinat/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source1: baselibs.conf
|
||||
Source2: %{name}.conf
|
||||
Source3: %{name}
|
||||
# PATCH-FIX-OPENSUSE apulse-link-math.patch sor.alexei@meowr.ru -- Link with -lm to fix building.
|
||||
Patch0: apulse-link-math.patch
|
||||
Source2: %{name}.py
|
||||
Source3: %{name}.conf
|
||||
# PATCH-FIX-OPENSUSE apulse-fix-pulse-12.patch sor.alexei@meowr.ru -- Fix PulseAudio 12+ compatibility.
|
||||
Patch0: apulse-fix-pulse-12.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkgconfig
|
||||
@ -40,34 +41,40 @@ Recommends: %{name}-32bit = %{version}
|
||||
%endif
|
||||
|
||||
%description
|
||||
PulseAudio emulation intended to be used with Skype and Firefox
|
||||
PulseAudio emulation intended to be used with Firefox and Skype.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%cmake -LA -DUSE_BUNDLED_PULSEAUDIO_HEADERS=OFF -DAPULSEPATH=%{_libdir}/%{name}
|
||||
make %{?_smp_mflags}
|
||||
%cmake \
|
||||
-DUSE_BUNDLED_PULSEAUDIO_HEADERS=OFF \
|
||||
-DAPULSEPATH=%{_libdir}/%{name} \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="" -LA
|
||||
make %{?_smp_mflags} V=1
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_libdir}/%{name}
|
||||
install -m644 build/libpulse*.so.* %{buildroot}%{_libdir}/%{name}
|
||||
mkdir %{buildroot}%{_sysconfdir}
|
||||
install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}
|
||||
mkdir %{buildroot}%{_bindir}
|
||||
install %{SOURCE3} %{buildroot}%{_bindir}
|
||||
%cmake_install
|
||||
rm %{buildroot}%{_libdir}/%{name}/libpulse*.so
|
||||
install -Dpm 0755 %{SOURCE2} %{buildroot}%{_bindir}/%{name}
|
||||
install -Dpm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}.conf
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,-)
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%license LICENSE.MIT
|
||||
%else
|
||||
%doc LICENSE.MIT
|
||||
%endif
|
||||
%doc README.md
|
||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||
%attr(0755,root,root) %{_bindir}/%{name}
|
||||
%{_bindir}/%{name}
|
||||
%dir %{_libdir}/%{name}
|
||||
%{_libdir}/%{name}/libpulse*.so.*
|
||||
%{_mandir}/man1/apulse.1%{?ext_man}
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user