PKGBUILDs/extra/pulseaudio/PKGBUILD

201 lines
5.8 KiB
Bash
Raw Normal View History

# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2013-04-01 23:50:22 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2019-09-12 11:55:38 +00:00
# - patch to remove meson NEON check
2021-07-29 00:28:28 +00:00
# - remove makedepend on valgrind, meson with -D valgrind=disabled
2013-04-01 23:50:22 +00:00
pkgbase=pulseaudio
2021-01-21 01:02:36 +00:00
pkgname=(pulseaudio libpulse pulseaudio-{zeroconf,lirc,jack,bluetooth,equalizer,rtp})
2013-04-01 23:50:22 +00:00
pkgdesc="A featureful, general-purpose sound server"
2021-07-29 00:28:28 +00:00
pkgver=15.0
pkgrel=1
2018-06-21 12:56:44 +00:00
arch=(x86_64)
url="https://www.freedesktop.org/wiki/Software/PulseAudio/"
2017-01-19 02:24:35 +00:00
license=(GPL)
2019-09-12 11:55:38 +00:00
makedepends=(libasyncns libcap attr libxtst libsm libsndfile rtkit libsoxr
speexdsp tdb systemd dbus avahi bluez bluez-libs jack2 sbc
lirc openssl fftw orc gtk3 webrtc-audio-processing check git meson
2021-07-29 00:28:28 +00:00
xmltoman doxygen)
_commit=6329a2498eb038f8a9537888280a62b00a93f68e # tags/v15.0^0
2019-09-12 11:55:38 +00:00
source=("git+https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git#commit=$_commit"
'0001-disable-neon.patch')
sha256sums=('SKIP'
2021-07-29 00:28:28 +00:00
'a6fc3a127aa8523b9b88f53217aeae01fb1831f33e265b9e1e233c3db2a97cf2')
2013-04-01 23:50:22 +00:00
2017-01-19 02:24:35 +00:00
pkgver() {
cd pulseaudio
git describe --tags | sed 's/^v//;s/-/+/g'
}
2013-10-30 14:06:42 +00:00
prepare() {
2017-01-19 02:24:35 +00:00
cd pulseaudio
2019-09-15 14:37:32 +00:00
2020-01-11 19:53:57 +00:00
# Freeze version before patching
./git-version-gen doesnt-exist >.tarball-version
2019-09-12 11:55:38 +00:00
if [[ $CARCH != "aarch64" ]]; then
patch -p1 -i ../0001-disable-neon.patch
fi
2013-10-30 14:06:42 +00:00
}
2013-10-28 14:04:55 +00:00
2013-04-01 23:50:22 +00:00
build() {
2021-07-29 00:28:28 +00:00
local meson_options=(
-D stream-restore-clear-old-devices=true
-D pulsedsp-location='/usr/\$LIB/pulseaudio'
2019-09-12 11:55:38 +00:00
-D udevrulesdir=/usr/lib/udev/rules.d
2021-07-29 00:28:28 +00:00
-D bluez5-gstreamer=disabled
-D elogind=disabled
-D tcpwrap=disabled
-D valgrind=disabled
)
arch-meson pulseaudio build "${meson_options[@]}"
meson compile -C build
2019-09-12 11:55:38 +00:00
}
2017-01-19 02:24:35 +00:00
2019-09-12 11:55:38 +00:00
check() {
meson test -C build --print-errorlogs
ninja -C build test-daemon
}
_pick() {
local p="$1" f d; shift
for f; do
d="$srcdir/$p/${f#$pkgdir/}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
2013-04-01 23:50:22 +00:00
}
package_pulseaudio() {
2021-01-21 01:02:36 +00:00
depends=("libpulse=$pkgver-$pkgrel" rtkit libltdl speexdsp tdb orc libsoxr
webrtc-audio-processing libxtst)
optdepends=('pulseaudio-alsa: ALSA configuration (recommended)'
'pulseaudio-zeroconf: Zeroconf support'
'pulseaudio-lirc: IR (lirc) support'
'pulseaudio-jack: Jack support'
'pulseaudio-bluetooth: Bluetooth support'
'pulseaudio-equalizer: Graphical equalizer'
'pulseaudio-rtp: RTP and RAOP support')
2013-04-01 23:50:22 +00:00
backup=(etc/pulse/{daemon.conf,default.pa,system.pa})
2015-05-15 04:37:46 +00:00
install=pulseaudio.install
2018-06-21 12:56:44 +00:00
replaces=('pulseaudio-xen<=9.0' 'pulseaudio-gconf<=11.1')
2013-04-01 23:50:22 +00:00
2019-09-12 11:55:38 +00:00
local pulsever=$(cd pulseaudio; ./git-version-gen .tarball-version)
while [[ $pulsever = *.*.* ]]; do
pulsever=${pulsever%.*}
2015-09-27 17:00:34 +00:00
done
2019-09-12 11:55:38 +00:00
pulsever=${pulsever%%-*}
2015-09-24 18:16:08 +00:00
2021-07-29 00:28:28 +00:00
meson install -C build --destdir "$pkgdir"
2013-04-01 23:50:22 +00:00
2015-09-24 18:16:08 +00:00
cd "$pkgdir"
# Superseded by socket activation
2015-12-10 05:58:36 +00:00
sed -e '/autospawn/iautospawn = no' \
2015-09-24 18:16:08 +00:00
-i etc/pulse/client.conf
2013-04-01 23:50:22 +00:00
# Disable cork-request module, can result in e.g. media players unpausing
# when there's a Skype call incoming
sed -e 's|/usr/bin/pactl load-module module-x11-cork-request|#&|' \
2015-09-24 18:16:08 +00:00
-i usr/bin/start-pulseaudio-x11
2013-04-01 23:50:22 +00:00
2018-07-26 12:21:35 +00:00
# Required by qpaeq
sed -e '/Load several protocols/aload-module module-dbus-protocol' \
-i etc/pulse/default.pa
2019-09-12 11:55:38 +00:00
rm -r etc/dbus-1
2015-09-24 18:16:08 +00:00
# Split packages
2019-09-12 11:55:38 +00:00
_pick libpulse etc/pulse/client.conf
_pick libpulse usr/bin/pa{cat,ctl,dsp,mon,play,rec,record}
_pick libpulse usr/lib/libpulse{,-simple,-mainloop-glib}.so*
_pick libpulse usr/lib/{cmake,pkgconfig}
_pick libpulse usr/lib/pulseaudio/libpulse{dsp,common-*}.so
_pick libpulse usr/include
_pick libpulse usr/share/man/man1/pa{cat,ctl,dsp,mon,play,rec,record}.1
_pick libpulse usr/share/man/man5/pulse-client.conf.5
2021-03-25 18:43:24 +00:00
_pick libpulse usr/share/bash-completion/completions/pa{cat,ctl,dsp,play,rec,record}
_pick libpulse usr/share/bash-completion/completions/pulseaudio
2019-09-12 11:55:38 +00:00
_pick libpulse usr/share/vala
2021-03-25 18:43:24 +00:00
_pick libpulse usr/share/zsh
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
local moddir=usr/lib/pulse-$pulsever/modules
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
_pick zeroconf $moddir/libavahi-wrap.so
_pick zeroconf $moddir/module-zeroconf-{publish,discover}.so
_pick zeroconf $moddir/module-raop-discover.so
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
_pick lirc $moddir/module-lirc.so
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
_pick jack $moddir/module-jack-{sink,source}.so
_pick jack $moddir/module-jackdbus-detect.so
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
_pick bluetooth $moddir/libbluez5-util.so
_pick bluetooth $moddir/module-bluetooth-{discover,policy}.so
_pick bluetooth $moddir/module-bluez5-{discover,device}.so
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
_pick equalizer $moddir/module-equalizer-sink.so
_pick equalizer usr/bin/qpaeq
_pick rtp $moddir/lib{rtp,raop}.so
_pick rtp $moddir/module-rtp-{send,recv}.so
_pick rtp $moddir/module-raop-sink.so
2013-04-01 23:50:22 +00:00
}
package_libpulse() {
pkgdesc="$pkgdesc (client library)"
depends=(dbus libasyncns libcap libxcb libsm libsndfile systemd)
optdepends=('glib2: mainloop integration')
2020-01-11 19:53:57 +00:00
provides=(libpulse{,-simple,-mainloop-glib}.so)
2017-01-19 02:24:35 +00:00
license=(LGPL)
2013-04-01 23:50:22 +00:00
backup=(etc/pulse/client.conf)
2019-09-12 11:55:38 +00:00
mv libpulse/* "$pkgdir"
2013-04-01 23:50:22 +00:00
}
2015-05-15 04:37:46 +00:00
2021-01-21 01:02:36 +00:00
package_pulseaudio-zeroconf() {
2015-05-15 04:37:46 +00:00
pkgdesc="Zeroconf support for PulseAudio"
2015-09-24 18:16:08 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" avahi openssl)
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
mv zeroconf/* "$pkgdir"
2015-05-15 04:37:46 +00:00
}
2021-01-21 01:02:36 +00:00
package_pulseaudio-lirc() {
2015-05-15 04:37:46 +00:00
pkgdesc="IR (lirc) support for PulseAudio"
2015-09-24 18:16:08 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" lirc)
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
mv lirc/* "$pkgdir"
2015-05-15 04:37:46 +00:00
}
2021-01-21 01:02:36 +00:00
package_pulseaudio-jack() {
2015-05-15 04:37:46 +00:00
pkgdesc="Jack support for PulseAudio"
2017-01-19 18:45:27 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" jack)
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
mv jack/* "$pkgdir"
2015-05-15 04:37:46 +00:00
}
2021-01-21 01:02:36 +00:00
package_pulseaudio-bluetooth() {
2015-05-15 04:37:46 +00:00
pkgdesc="Bluetooth support for PulseAudio"
2017-01-19 02:24:35 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" bluez bluez-libs sbc)
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
mv bluetooth/* "$pkgdir"
2015-05-15 04:37:46 +00:00
}
2021-01-21 01:02:36 +00:00
package_pulseaudio-equalizer() {
pkgdesc="Graphical equalizer for PulseAudio"
depends=("pulseaudio=$pkgver-$pkgrel" python-{pyqt5,dbus} fftw)
2015-05-15 04:37:46 +00:00
2019-09-12 11:55:38 +00:00
mv equalizer/* "$pkgdir"
2015-05-15 04:37:46 +00:00
}
2019-09-12 11:55:38 +00:00
2021-01-21 01:02:36 +00:00
package_pulseaudio-rtp() {
pkgdesc="RTP and RAOP support for PulseAudio"
depends=("pulseaudio=$pkgver-$pkgrel")
mv rtp/* "$pkgdir"
}
2019-09-12 11:55:38 +00:00
# vim:set sw=2 et: