[arch-commits] Commit in alsa-plugins/trunk (PKGBUILD pulse-sysdefault.diff)

Jan Steffens heftig at archlinux.org
Wed May 13 18:43:19 UTC 2020


    Date: Wednesday, May 13, 2020 @ 18:43:19
  Author: heftig
Revision: 383336

1.2.2-2: Move pulseaudio-alsa here

Added:
  alsa-plugins/trunk/pulse-sysdefault.diff
Modified:
  alsa-plugins/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   55 +++++++++++++++++++++++++++++++++---------------
 pulse-sysdefault.diff |   17 ++++++++++++++
 2 files changed, 55 insertions(+), 17 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-13 16:50:45 UTC (rev 383335)
+++ PKGBUILD	2020-05-13 18:43:19 UTC (rev 383336)
@@ -3,27 +3,28 @@
 # Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
 # Contributor: Daniel Ehlers <danielehlers at mindeye.net>
 
-pkgname=alsa-plugins
+pkgbase=alsa-plugins
+pkgname=(alsa-plugins pulseaudio-alsa)
 pkgver=1.2.2
-pkgrel=1
+pkgrel=2
+epoch=1
 pkgdesc="Additional ALSA plugins"
 arch=(x86_64)
 url="https://www.alsa-project.org"
 license=(LGPL2.1)
-depends=(glibc)
 makedepends=(alsa-lib dbus jack libavtp libpulse libsamplerate speexdsp)
-optdepends=('dbus: for maemo plugin'
-            'jack: for pcm_jack plugin'
-            'libavtp: for pcm_aaf plugin'
-            'libsamplerate: for rate_samplerate plugin'
-            'libpulse: for conf_pulse, ctl_pulse and pcm_pulse plugins'
-            'speexdsp: for pcm_speex and rate_speexrate plugins')
-source=("https://www.alsa-project.org/files/pub/plugins/$pkgname-$pkgver.tar.bz2")
-sha256sums=('1c0f06450c928d711719686c9dbece2d480184f36fab11b8f0534cb7b41e337d')
+source=("https://www.alsa-project.org/files/pub/plugins/$pkgbase-$pkgver.tar.bz2"
+        pulse-sysdefault.diff)
+sha256sums=('1c0f06450c928d711719686c9dbece2d480184f36fab11b8f0534cb7b41e337d'
+            'd8c59b891e2913619d057ffea308293d73892b16fa5a01583d056e372e55309d')
 
 prepare() {
-  cd $pkgname-$pkgver
+  cd $pkgbase-$pkgver
 
+  # Make use of the pulse plugin's "fallback" feature
+  # Keeps parity with our old config from pulseaudio-alsa
+  patch -Np1 -i ../pulse-sysdefault.diff
+
   # a52, lavrate plugins not compatible with ffmpeg >= 4.0
   # https://mailman.alsa-project.org/pipermail/alsa-devel/2019-December/159425.html
   # https://bugs.archlinux.org/task/60586
@@ -31,7 +32,7 @@
 }
 
 build() {
-  cd $pkgname-$pkgver
+  cd $pkgbase-$pkgver
   ./configure \
     --prefix=/usr \
     --sysconfdir=/etc \
@@ -40,16 +41,36 @@
   make
 }
 
-package() {
-  depends+=(libasound.so)
+package_alsa-plugins() {
+  depends=(glibc libasound.so)
+  optdepends=('dbus: for maemo plugin'
+              'jack: for pcm_jack plugin'
+              'libavtp: for pcm_aaf plugin'
+              'libsamplerate: for rate_samplerate plugin'
+              'libpulse: for conf_pulse, ctl_pulse and pcm_pulse plugins'
+              'speexdsp: for pcm_speex and rate_speexrate plugins')
 
-  cd $pkgname-$pkgver
+  cd $pkgbase-$pkgver
   make DESTDIR="$pkgdir" install
-  install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 doc/README* doc/*.txt
+  install -Dt "$pkgdir/usr/share/doc/$pkgbase" -m644 doc/README* doc/*.txt
+
   # remove maemo plugin configuration (it overrides defaults for pcm and ctl),
   # until a better way is found to package default overrides:
   # https://bugs.archlinux.org/task/65440
   rm -v "${pkgdir}/etc/alsa/conf.d/98-maemo.conf"
+
+  # make a proper off-by-default config template out of the example file
+  mv -v "${pkgdir}/etc/alsa/conf.d/99-pulseaudio-default.conf.example" \
+    "${pkgdir}/usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf"
 }
 
+package_pulseaudio-alsa() {
+  pkgdesc="ALSA Configuration for PulseAudio"
+  depends=('alsa-plugins>=1.2.2-2' pulseaudio)
+
+  mkdir -p "${pkgdir}/etc/alsa/conf.d"
+  ln -st "${pkgdir}/etc/alsa/conf.d" \
+    /usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf
+}
+
 # vim:set sw=2 et:

Added: pulse-sysdefault.diff
===================================================================
--- pulse-sysdefault.diff	                        (rev 0)
+++ pulse-sysdefault.diff	2020-05-13 18:43:19 UTC (rev 383336)
@@ -0,0 +1,17 @@
+diff -u -r alsa-plugins-1.2.2/pulse/99-pulseaudio-default.conf.example alsa-plugins-1.2.2-pulse-sysdefault/pulse/99-pulseaudio-default.conf.example
+--- alsa-plugins-1.2.2/pulse/99-pulseaudio-default.conf.example	2020-02-19 09:35:42.000000000 +0000
++++ alsa-plugins-1.2.2-pulse-sysdefault/pulse/99-pulseaudio-default.conf.example	2020-05-13 10:04:28.446568563 +0000
+@@ -2,6 +2,7 @@
+ 
+ pcm.!default {
+     type pulse
++    fallback "sysdefault"
+     hint {
+         show on
+         description "Default ALSA Output (currently PulseAudio Sound Server)"
+@@ -10,4 +11,5 @@
+ 
+ ctl.!default {
+     type pulse
++    fallback "sysdefault"
+ }



More information about the arch-commits mailing list