1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
3 # Contributor: Jan de Groot <jgc@archlinux.org>
21 _commit=9f7d60c1e84cc0481afc3f6ccf76e127567943a8 # tags/0.3.70
25 pkgdesc="Low-latency audio/video router and processor"
26 url="https://pipewire.org"
64 webrtc-audio-processing
66 checkdepends=(desktop-file-utils)
67 source=("git+https://gitlab.freedesktop.org/pipewire/pipewire.git#commit=$_commit")
72 git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
78 # remove export of LD_LIBRARY_PATH for pw-jack as it would add /usr/lib
79 sed -i '/LD_LIBRARY_PATH/d' pipewire-jack/src/pw-jack.in
84 -D bluez5-codec-lc3=enabled
85 -D bluez5-codec-lc3plus=disabled
86 -D compress-offload=enabled
90 -D libjack-path=/usr/lib
91 -D rlimits-install=false
92 -D session-managers=[]
93 -D udevrulesdir=/usr/lib/udev/rules.d
96 arch-meson pipewire build "${meson_options[@]}"
97 meson compile -C build
101 meson test -C build --print-errorlogs
105 local p="$1" f d; shift
107 d="$srcdir/$p/${f#$pkgdir/}"
108 mkdir -p "$(dirname "$d")"
110 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
117 license+=(LGPL) # libspa-alsa
119 "libpipewire=$epoch:$pkgver-$pkgrel"
131 'gst-plugin-pipewire: GStreamer plugin'
132 'pipewire-alsa: ALSA configuration'
133 'pipewire-audio: Audio support'
134 'pipewire-docs: Documentation'
135 'pipewire-jack: JACK support'
136 'pipewire-pulse: PulseAudio replacement'
137 'pipewire-roc: ROC streaming'
138 'pipewire-session-manager: Session manager'
139 'pipewire-v4l2: V4L2 interceptor'
140 'pipewire-x11-bell: X11 bell'
141 'pipewire-zeroconf: Zeroconf support'
142 'realtime-privileges: realtime privileges with rt module'
143 'rtkit: realtime privileges with rtkit module'
145 install=pipewire.install
147 meson install -C build --destdir "$pkgdir"
152 # Replace copies with symlinks
153 for _f in pipewire-{aes67,avb,pulse}; do
154 cmp usr/bin/pipewire usr/bin/$_f
155 ln -sf pipewire usr/bin/$_f
158 _pick lib usr/include/{pipewire-$_ver,spa-0.2}
159 _pick lib usr/lib/libpipewire-$_ver.so*
160 _pick lib usr/lib/pkgconfig/lib{pipewire-$_ver,spa-0.2}.pc
162 _pick acp usr/lib/udev
163 _pick acp usr/share/alsa-card-profile
165 _pick docs usr/share/doc
167 _pick audio usr/bin/pipewire-{aes67,avb}
168 _pick audio usr/bin/pw-{cat,{,enc}play,record,midi{play,record},dsdplay}
169 _pick audio usr/bin/pw-{loopback,mididump}
170 _pick audio usr/bin/spa-{acp-tool,resample}
171 _pick audio usr/lib/alsa-lib
172 _pick audio usr/lib/pipewire-$_ver/libpipewire-module-avb.so
173 _pick audio usr/lib/pipewire-$_ver/libpipewire-module-echo-cancel.so
174 _pick audio usr/lib/pipewire-$_ver/libpipewire-module-fallback-sink.so
175 _pick audio usr/lib/pipewire-$_ver/libpipewire-module-filter-chain.so
176 _pick audio usr/lib/pipewire-$_ver/libpipewire-module-loopback.so
177 _pick audio usr/lib/pipewire-$_ver/libpipewire-module-pipe-tunnel.so
178 _pick audio usr/lib/pipewire-$_ver/libpipewire-module-protocol-simple.so
179 _pick audio usr/lib/pipewire-$_ver/libpipewire-module-rtp-*.so
180 _pick audio usr/lib/spa-0.2/{aec,alsa,audio*,avb,bluez5}
181 _pick audio usr/lib/systemd/user/filter-chain.service
182 _pick audio usr/share/alsa
183 _pick audio usr/share/man/man1/pw-{cat,mididump}.1
184 _pick audio usr/share/pipewire/filter-chain*
185 _pick audio usr/share/pipewire/pipewire-{aes67,avb}.conf
186 _pick audio usr/share/spa-0.2/bluez5
188 _pick jack usr/bin/pw-jack
189 _pick jack usr/include/jack
190 _pick jack usr/lib/libjack*
191 _pick jack usr/lib/pkgconfig/jack.pc
192 _pick jack usr/share/man/man1/pw-jack.1
193 _pick jack usr/share/pipewire/jack.conf
195 _pick pulse usr/bin/pipewire-pulse
196 _pick pulse usr/lib/pipewire-$_ver/libpipewire-module-protocol-pulse.so
197 _pick pulse usr/lib/pipewire-$_ver/libpipewire-module-pulse-tunnel.so
198 _pick pulse usr/lib/systemd/user/pipewire-pulse.*
199 _pick pulse usr/share/man/man1/pipewire-pulse.1
200 _pick pulse usr/share/pipewire/pipewire-pulse.conf
202 _pick roc usr/lib/pipewire-$_ver/libpipewire-module-roc*.so
204 _pick gst usr/lib/gstreamer-1.0
206 _pick zeroconf usr/lib/pipewire-$_ver/libpipewire-module-{raop,zeroconf}-*.so
208 _pick v4l2 usr/bin/pw-v4l2 usr/lib/pipewire-$_ver/v4l2
210 _pick x11-bell usr/lib/pipewire-$_ver/libpipewire-module-x11-bell.so
212 # directories for overrides
213 mkdir -p etc/pipewire/{client-rt,client,minimal,pipewire}.conf.d
216 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
219 package_libpipewire() {
220 pkgdesc+=" - client library"
224 provides=(libpipewire-$_ver.so)
228 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
231 package_alsa-card-profiles() {
232 pkgdesc+=" - ALSA card profiles"
238 package_pipewire-docs() {
239 pkgdesc+=" - documentation"
243 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
246 package_pipewire-audio() {
247 pkgdesc+=" - Audio support"
264 libwebrtc_audio_processing.so
270 mkdir -p "$pkgdir/etc/alsa/conf.d"
271 ln -st "$pkgdir/etc/alsa/conf.d" \
272 /usr/share/alsa/alsa.conf.d/50-pipewire.conf
274 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
277 package_pipewire-alsa() {
278 pkgdesc+=" - ALSA configuration"
282 pipewire-session-manager
284 conflicts=(pulseaudio-alsa)
285 provides=(pulseaudio-alsa)
287 mkdir -p "$pkgdir/etc/alsa/conf.d"
288 ln -st "$pkgdir/etc/alsa/conf.d" \
289 /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf
291 install -Dm644 /dev/null \
292 "$pkgdir/usr/share/pipewire/media-session.d/with-alsa"
294 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
297 package_pipewire-jack() {
298 pkgdesc+=" - JACK support"
299 license+=(GPL2) # libjackserver
304 pipewire-session-manager
307 optdepends=('jack-example-tools: for official JACK example-clients and tools')
308 conflicts=(jack jack2)
309 provides=(jack libjack.so libjackserver.so libjacknet.so)
313 install -Dm644 /dev/null \
314 "$pkgdir/usr/share/pipewire/media-session.d/with-jack"
316 # directories for overrides
317 mkdir -p "$pkgdir/etc/pipewire/jack.conf.d"
319 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
322 package_pipewire-pulse() {
323 pkgdesc+=" - PulseAudio replacement"
325 libavahi-{client,common}.so
331 pipewire-session-manager
333 provides=(pulseaudio pulseaudio-bluetooth)
334 conflicts=(pulseaudio pulseaudio-bluetooth)
335 install=pipewire-pulse.install
339 # directory for overrides
340 mkdir -p "$pkgdir/etc/pipewire/pipewire-pulse.conf.d"
342 install -Dm644 /dev/null \
343 "$pkgdir/usr/share/pipewire/media-session.d/with-pulseaudio"
345 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
348 package_pipewire-roc() {
349 pkgdesc+=" - ROC streaming support"
360 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
363 package_gst-plugin-pipewire() {
364 pkgdesc="Multimedia graph framework - pipewire plugin"
366 gst-plugins-base-libs
369 pipewire-session-manager
374 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
377 package_pipewire-zeroconf() {
378 pkgdesc+=" - Zeroconf support"
380 libavahi-{client,common}.so
386 mv zeroconf/* "$pkgdir"
388 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
391 package_pipewire-v4l2() {
392 pkgdesc+=" - V4L2 interceptor"
396 pipewire-session-manager
402 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
405 package_pipewire-x11-bell() {
406 pkgdesc+=" - X11 bell"
416 mv x11-bell/* "$pkgdir"
418 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
421 # vim:set sw=2 sts=-1 et: