PKGBUILDs/extra/pulseaudio/PKGBUILD

189 lines
5.6 KiB
Bash
Raw Normal View History

2013-04-01 23:50:22 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2019-09-12 11:55:38 +00:00
# - patch to remove meson NEON check
2013-04-01 23:50:22 +00:00
pkgbase=pulseaudio
2018-06-21 12:56:44 +00:00
pkgname=(pulseaudio libpulse pulseaudio-{zeroconf,lirc,jack,bluetooth,equalizer})
2013-04-01 23:50:22 +00:00
pkgdesc="A featureful, general-purpose sound server"
2019-09-15 00:00:04 +00:00
pkgver=13.0
2020-01-11 19:53:57 +00:00
pkgrel=3
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
xmltoman)
2019-09-15 00:00:04 +00:00
_commit=200618b32f0964a479d69c9b6e5073e6931c370a # tags/v13.0^0
2019-09-12 11:55:38 +00:00
source=("git+https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git#commit=$_commit"
2019-09-15 14:37:32 +00:00
0001-meson-Define-TUNNEL_SINK-for-module-tunnel-sink.patch
2019-09-12 11:55:38 +00:00
'0001-disable-neon.patch')
sha256sums=('SKIP'
2019-09-15 14:37:32 +00:00
'4ff133e2847baad5bb6798b5816d67551cfba2efabb2f1f348628d7217abd07d'
2019-09-12 11:55:38 +00:00
'b1c20e992511e62f28434f0c4217c13aa9a557ae93dda5df4127aa42b0800614')
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-15 14:37:32 +00:00
# https://bugs.archlinux.org/task/63755
git apply -3 ../0001-meson-Define-TUNNEL_SINK-for-module-tunnel-sink.patch
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() {
2019-09-12 11:55:38 +00:00
arch-meson pulseaudio build \
-D gcov=false \
-D pulsedsp-location='/usr/\$LIB/pulseaudio' \
-D udevrulesdir=/usr/lib/udev/rules.d
ninja -C build
}
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() {
2017-01-19 02:24:35 +00:00
depends=("libpulse=$pkgver-$pkgrel" rtkit libltdl speexdsp tdb orc libsoxr
webrtc-audio-processing)
2015-05-15 04:37:46 +00:00
optdepends=('pulseaudio-alsa: ALSA configuration (recommended)')
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
2019-09-12 11:55:38 +00:00
DESTDIR="$pkgdir" meson install -C build
2013-04-01 23:50:22 +00:00
2015-09-24 18:16:08 +00:00
cd "$pkgdir"
2016-01-22 21:50:15 +00:00
# Assumes that any volume adjustment is intended by the user, who can control
# each app's volume. Misbehaving clients can trigger earsplitting volume
# jumps. App volumes can diverge wildly and cause apps without their own
# volume control to fall below sink volume; a sink-only volume control will
# suddenly be unable to make such an app loud enough.
2015-12-10 05:58:36 +00:00
sed -e '/flat-volumes/iflat-volumes = no' \
2015-09-24 18:16:08 +00:00
-i etc/pulse/daemon.conf
# 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
2013-04-01 23:50:22 +00:00
### Split libpulse
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
_pick libpulse usr/share/vala
2015-05-15 04:37:46 +00:00
### Split modules
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
2013-04-01 23:50:22 +00:00
}
package_libpulse() {
pkgdesc="$pkgdesc (client library)"
2017-01-19 02:24:35 +00:00
depends=(dbus libasyncns libcap libxtst libsm libsndfile systemd)
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
package_pulseaudio-zeroconf(){
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
}
package_pulseaudio-lirc(){
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
}
package_pulseaudio-jack(){
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
}
package_pulseaudio-bluetooth(){
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
}
package_pulseaudio-equalizer(){
pkgdesc="Equalizer for PulseAudio"
2018-07-26 12:21:35 +00:00
depends=("pulseaudio=$pkgver-$pkgrel" python-{pyqt5,dbus,sip} 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
# vim:set sw=2 et: