PKGBUILD 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
  3. pkgbase=pulseaudio
  4. pkgname=(pulseaudio libpulse pulseaudio-{zeroconf,lirc,jack,bluetooth,equalizer,rtp})
  5. pkgdesc="A featureful, general-purpose sound server"
  6. pkgver=15.0
  7. pkgrel=1
  8. pkgrel+=.nonsystemd1
  9. arch=(x86_64)
  10. arch+=(i686 armv7h)
  11. url="https://www.freedesktop.org/wiki/Software/PulseAudio/"
  12. license=(GPL)
  13. makedepends=(libasyncns libcap attr libxtst libsm libsndfile rtkit libsoxr
  14. speexdsp tdb elogind dbus avahi bluez bluez-libs jack2 sbc
  15. lirc openssl fftw orc gtk3 webrtc-audio-processing check git meson
  16. xmltoman valgrind doxygen)
  17. _commit=6329a2498eb038f8a9537888280a62b00a93f68e # tags/v15.0^0
  18. source=("git+https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git#commit=$_commit")
  19. sha256sums=('SKIP')
  20. pkgver() {
  21. cd pulseaudio
  22. git describe --tags | sed 's/^v//;s/-/+/g'
  23. }
  24. prepare() {
  25. cd pulseaudio
  26. # Freeze version before patching
  27. ./git-version-gen doesnt-exist >.tarball-version
  28. }
  29. build() {
  30. local meson_options=(
  31. -D stream-restore-clear-old-devices=true
  32. -D pulsedsp-location='/usr/\$LIB/pulseaudio'
  33. -D udevrulesdir=/usr/lib/udev/rules.d
  34. -D bluez5-gstreamer=disabled
  35. -D tcpwrap=disabled
  36. -D systemd=disabled
  37. -D elogind=enabled
  38. )
  39. arch-meson pulseaudio build "${meson_options[@]}"
  40. meson compile -C build
  41. }
  42. check() {
  43. meson test -C build --print-errorlogs
  44. ninja -C build test-daemon
  45. }
  46. _pick() {
  47. local p="$1" f d; shift
  48. for f; do
  49. d="$srcdir/$p/${f#$pkgdir/}"
  50. mkdir -p "$(dirname "$d")"
  51. mv "$f" "$d"
  52. rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  53. done
  54. }
  55. package_pulseaudio() {
  56. depends=("libpulse=$pkgver-$pkgrel" rtkit libltdl speexdsp tdb orc libsoxr
  57. webrtc-audio-processing libxtst)
  58. optdepends=('pulseaudio-alsa: ALSA configuration (recommended)'
  59. 'pulseaudio-zeroconf: Zeroconf support'
  60. 'pulseaudio-lirc: IR (lirc) support'
  61. 'pulseaudio-jack: Jack support'
  62. 'pulseaudio-bluetooth: Bluetooth support'
  63. 'pulseaudio-equalizer: Graphical equalizer'
  64. 'pulseaudio-rtp: RTP and RAOP support')
  65. backup=(etc/pulse/{daemon.conf,default.pa,system.pa})
  66. replaces=('pulseaudio-xen<=9.0' 'pulseaudio-gconf<=11.1')
  67. local pulsever=$(cd pulseaudio; ./git-version-gen .tarball-version)
  68. while [[ $pulsever = *.*.* ]]; do
  69. pulsever=${pulsever%.*}
  70. done
  71. pulsever=${pulsever%%-*}
  72. meson install -C build --destdir "$pkgdir"
  73. cd "$pkgdir"
  74. # Superseded by socket activation
  75. sed -e '/autospawn/iautospawn = yes' \
  76. -i etc/pulse/client.conf
  77. # Disable cork-request module, can result in e.g. media players unpausing
  78. # when there's a Skype call incoming
  79. sed -e 's|/usr/bin/pactl load-module module-x11-cork-request|#&|' \
  80. -i usr/bin/start-pulseaudio-x11
  81. # Required by qpaeq
  82. sed -e '/Load several protocols/aload-module module-dbus-protocol' \
  83. -i etc/pulse/default.pa
  84. rm -r etc/dbus-1
  85. # Split packages
  86. _pick libpulse etc/pulse/client.conf
  87. _pick libpulse usr/bin/pa{cat,ctl,dsp,mon,play,rec,record}
  88. _pick libpulse usr/lib/libpulse{,-simple,-mainloop-glib}.so*
  89. _pick libpulse usr/lib/{cmake,pkgconfig}
  90. _pick libpulse usr/lib/pulseaudio/libpulse{dsp,common-*}.so
  91. _pick libpulse usr/include
  92. _pick libpulse usr/share/man/man1/pa{cat,ctl,dsp,mon,play,rec,record}.1
  93. _pick libpulse usr/share/man/man5/pulse-client.conf.5
  94. _pick libpulse usr/share/bash-completion/completions/pa{cat,ctl,dsp,play,rec,record}
  95. _pick libpulse usr/share/bash-completion/completions/pulseaudio
  96. _pick libpulse usr/share/vala
  97. _pick libpulse usr/share/zsh
  98. local moddir=usr/lib/pulse-$pulsever/modules
  99. _pick zeroconf $moddir/libavahi-wrap.so
  100. _pick zeroconf $moddir/module-zeroconf-{publish,discover}.so
  101. _pick zeroconf $moddir/module-raop-discover.so
  102. _pick lirc $moddir/module-lirc.so
  103. _pick jack $moddir/module-jack-{sink,source}.so
  104. _pick jack $moddir/module-jackdbus-detect.so
  105. _pick bluetooth $moddir/libbluez5-util.so
  106. _pick bluetooth $moddir/module-bluetooth-{discover,policy}.so
  107. _pick bluetooth $moddir/module-bluez5-{discover,device}.so
  108. _pick equalizer $moddir/module-equalizer-sink.so
  109. _pick equalizer usr/bin/qpaeq
  110. _pick rtp $moddir/lib{rtp,raop}.so
  111. _pick rtp $moddir/module-rtp-{send,recv}.so
  112. _pick rtp $moddir/module-raop-sink.so
  113. }
  114. package_libpulse() {
  115. pkgdesc="$pkgdesc (client library)"
  116. depends=(dbus libasyncns libcap libxcb libsm libsndfile libelogind)
  117. optdepends=('glib2: mainloop integration')
  118. provides=(libpulse{,-simple,-mainloop-glib}.so)
  119. license=(LGPL)
  120. backup=(etc/pulse/client.conf)
  121. mv libpulse/* "$pkgdir"
  122. }
  123. package_pulseaudio-zeroconf() {
  124. pkgdesc="Zeroconf support for PulseAudio"
  125. depends=("pulseaudio=$pkgver-$pkgrel" avahi openssl)
  126. mv zeroconf/* "$pkgdir"
  127. }
  128. package_pulseaudio-lirc() {
  129. pkgdesc="IR (lirc) support for PulseAudio"
  130. depends=("pulseaudio=$pkgver-$pkgrel" lirc)
  131. mv lirc/* "$pkgdir"
  132. }
  133. package_pulseaudio-jack() {
  134. pkgdesc="Jack support for PulseAudio"
  135. depends=("pulseaudio=$pkgver-$pkgrel" jack)
  136. mv jack/* "$pkgdir"
  137. }
  138. package_pulseaudio-bluetooth() {
  139. pkgdesc="Bluetooth support for PulseAudio"
  140. depends=("pulseaudio=$pkgver-$pkgrel" bluez bluez-libs sbc)
  141. mv bluetooth/* "$pkgdir"
  142. }
  143. package_pulseaudio-equalizer() {
  144. pkgdesc="Graphical equalizer for PulseAudio"
  145. depends=("pulseaudio=$pkgver-$pkgrel" python-{pyqt5,dbus} fftw)
  146. mv equalizer/* "$pkgdir"
  147. }
  148. package_pulseaudio-rtp() {
  149. pkgdesc="RTP and RAOP support for PulseAudio"
  150. depends=("pulseaudio=$pkgver-$pkgrel")
  151. mv rtp/* "$pkgdir"
  152. }
  153. # vim:set sw=2 et: