1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
4 pkgname=(pulseaudio libpulse pulseaudio-{zeroconf,lirc,jack,bluetooth,equalizer,rtp})
5 pkgdesc="A featureful, general-purpose sound server"
9 url="https://www.freedesktop.org/wiki/Software/PulseAudio/"
11 makedepends=(libasyncns libcap attr libxtst libsm libsndfile rtkit libsoxr
12 speexdsp tdb systemd dbus avahi bluez bluez-libs jack2 sbc
13 lirc openssl fftw orc gtk3 webrtc-audio-processing check git meson
14 xmltoman valgrind doxygen)
15 _commit=6329a2498eb038f8a9537888280a62b00a93f68e # tags/v15.0^0
16 source=("git+https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git#commit=$_commit")
21 git describe --tags | sed 's/^v//;s/-/+/g'
27 # Freeze version before patching
28 ./git-version-gen doesnt-exist >.tarball-version
33 -D stream-restore-clear-old-devices=true
34 -D pulsedsp-location='/usr/\$LIB/pulseaudio'
35 -D udevrulesdir=/usr/lib/udev/rules.d
36 -D bluez5-gstreamer=disabled
41 arch-meson pulseaudio build "${meson_options[@]}"
42 meson compile -C build
46 meson test -C build --print-errorlogs
47 ninja -C build test-daemon
51 local p="$1" f d; shift
53 d="$srcdir/$p/${f#$pkgdir/}"
54 mkdir -p "$(dirname "$d")"
56 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
60 package_pulseaudio() {
61 depends=("libpulse=$pkgver-$pkgrel" rtkit libltdl speexdsp tdb orc libsoxr
62 webrtc-audio-processing libxtst)
63 optdepends=('pulseaudio-alsa: ALSA configuration (recommended)'
64 'pulseaudio-zeroconf: Zeroconf support'
65 'pulseaudio-lirc: IR (lirc) support'
66 'pulseaudio-jack: Jack support'
67 'pulseaudio-bluetooth: Bluetooth support'
68 'pulseaudio-equalizer: Graphical equalizer'
69 'pulseaudio-rtp: RTP and RAOP support')
70 backup=(etc/pulse/{daemon.conf,default.pa,system.pa})
71 install=pulseaudio.install
72 replaces=('pulseaudio-xen<=9.0' 'pulseaudio-gconf<=11.1')
74 local pulsever=$(cd pulseaudio; ./git-version-gen .tarball-version)
75 while [[ $pulsever = *.*.* ]]; do
76 pulsever=${pulsever%.*}
78 pulsever=${pulsever%%-*}
80 meson install -C build --destdir "$pkgdir"
84 # Superseded by socket activation
85 sed -e '/autospawn/iautospawn = no' \
86 -i etc/pulse/client.conf
88 # Disable cork-request module, can result in e.g. media players unpausing
89 # when there's a Skype call incoming
90 sed -e 's|/usr/bin/pactl load-module module-x11-cork-request|#&|' \
91 -i usr/bin/start-pulseaudio-x11
94 sed -e '/Load several protocols/aload-module module-dbus-protocol' \
95 -i etc/pulse/default.pa
100 _pick libpulse etc/pulse/client.conf
101 _pick libpulse usr/bin/pa{cat,ctl,dsp,mon,play,rec,record}
102 _pick libpulse usr/lib/libpulse{,-simple,-mainloop-glib}.so*
103 _pick libpulse usr/lib/{cmake,pkgconfig}
104 _pick libpulse usr/lib/pulseaudio/libpulse{dsp,common-*}.so
105 _pick libpulse usr/include
106 _pick libpulse usr/share/man/man1/pa{cat,ctl,dsp,mon,play,rec,record}.1
107 _pick libpulse usr/share/man/man5/pulse-client.conf.5
108 _pick libpulse usr/share/bash-completion/completions/pa{cat,ctl,dsp,play,rec,record}
109 _pick libpulse usr/share/bash-completion/completions/pulseaudio
110 _pick libpulse usr/share/vala
111 _pick libpulse usr/share/zsh
113 local moddir=usr/lib/pulse-$pulsever/modules
115 _pick zeroconf $moddir/libavahi-wrap.so
116 _pick zeroconf $moddir/module-zeroconf-{publish,discover}.so
117 _pick zeroconf $moddir/module-raop-discover.so
119 _pick lirc $moddir/module-lirc.so
121 _pick jack $moddir/module-jack-{sink,source}.so
122 _pick jack $moddir/module-jackdbus-detect.so
124 _pick bluetooth $moddir/libbluez5-util.so
125 _pick bluetooth $moddir/module-bluetooth-{discover,policy}.so
126 _pick bluetooth $moddir/module-bluez5-{discover,device}.so
128 _pick equalizer $moddir/module-equalizer-sink.so
129 _pick equalizer usr/bin/qpaeq
131 _pick rtp $moddir/lib{rtp,raop}.so
132 _pick rtp $moddir/module-rtp-{send,recv}.so
133 _pick rtp $moddir/module-raop-sink.so
137 pkgdesc="$pkgdesc (client library)"
138 depends=(dbus libasyncns libcap libxcb libsm libsndfile systemd)
139 optdepends=('glib2: mainloop integration')
140 provides=(libpulse{,-simple,-mainloop-glib}.so)
142 backup=(etc/pulse/client.conf)
144 mv libpulse/* "$pkgdir"
147 package_pulseaudio-zeroconf() {
148 pkgdesc="Zeroconf support for PulseAudio"
149 depends=("pulseaudio=$pkgver-$pkgrel" avahi openssl)
151 mv zeroconf/* "$pkgdir"
154 package_pulseaudio-lirc() {
155 pkgdesc="IR (lirc) support for PulseAudio"
156 depends=("pulseaudio=$pkgver-$pkgrel" lirc)
161 package_pulseaudio-jack() {
162 pkgdesc="Jack support for PulseAudio"
163 depends=("pulseaudio=$pkgver-$pkgrel" jack)
168 package_pulseaudio-bluetooth() {
169 pkgdesc="Bluetooth support for PulseAudio"
170 depends=("pulseaudio=$pkgver-$pkgrel" bluez bluez-libs sbc)
172 mv bluetooth/* "$pkgdir"
175 package_pulseaudio-equalizer() {
176 pkgdesc="Graphical equalizer for PulseAudio"
177 depends=("pulseaudio=$pkgver-$pkgrel" python-{pyqt5,dbus} fftw)
179 mv equalizer/* "$pkgdir"
182 package_pulseaudio-rtp() {
183 pkgdesc="RTP and RAOP support for PulseAudio"
184 depends=("pulseaudio=$pkgver-$pkgrel")