1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
5 pkgname=(pipewire alsa-card-profiles pipewire-docs pipewire-alsa pipewire-jack
6 pipewire-pulse gst-plugin-pipewire pipewire-zeroconf pipewire-v4l2)
10 pkgdesc="Low-latency audio/video router and processor"
11 url="https://pipewire.org"
14 makedepends=(git meson doxygen graphviz python-docutils valgrind libpulse
15 alsa-lib libusb gst-plugins-base rtkit dbus sdl2 ncurses libsndfile
16 bluez-libs sbc libldac libfreeaptx libfdk-aac avahi
17 webrtc-audio-processing)
18 checkdepends=(desktop-file-utils)
19 _commit=7afd80052b7c49754a13c9ab49c368f95b60e0a7 # tags/0.3.40
20 source=("git+https://gitlab.freedesktop.org/pipewire/pipewire.git#commit=$_commit")
25 git describe --tags | sed 's/-/+/g'
37 -D udevrulesdir=/usr/lib/udev/rules.d
39 -D session-managers=[]
42 arch-meson pipewire build "${meson_options[@]}"
43 meson compile -C build
47 meson test -C build --print-errorlogs
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")"
63 license+=(LGPL) # libspa-alsa
64 depends=(rtkit alsa-card-profiles libdbus-1.so libncursesw.so libsndfile.so
65 libudev.so libusb-1.0.so libasound.so libsystemd.so libbluetooth.so
66 libsbc.so libldacBT_enc.so libfreeaptx.so libfdk-aac.so
67 libwebrtc_audio_processing.so)
68 optdepends=('pipewire-docs: Documentation'
69 'pipewire-session-manager: Session manager'
70 'pipewire-alsa: ALSA configuration'
71 'pipewire-jack: JACK support'
72 'pipewire-pulse: PulseAudio replacement'
73 'gst-plugin-pipewire: GStreamer plugin'
74 'pipewire-zeroconf: Zeroconf support'
75 'pipewire-v4l2: V4L2 interceptor')
76 provides=(libpipewire-$_ver.so)
77 install=pipewire.install
79 meson install -C build --destdir "$pkgdir"
83 _pick acp usr/lib/udev
84 _pick acp usr/share/alsa-card-profile
86 _pick docs usr/share/doc
88 _pick jack usr/bin/pw-jack usr/lib/pipewire-$_ver/jack
89 _pick jack usr/share/man/man1/pw-jack.1
90 _pick jack usr/share/pipewire/jack.conf
92 _pick pulse usr/bin/pipewire-pulse
93 _pick pulse usr/lib/pipewire-$_ver/libpipewire-module-protocol-pulse.so
94 _pick pulse usr/lib/pipewire-$_ver/libpipewire-module-pulse-tunnel.so
95 _pick pulse usr/lib/systemd/user/pipewire-pulse.*
97 _pick gst usr/lib/gstreamer-1.0
99 _pick zeroconf usr/lib/pipewire-$_ver/libpipewire-module-zeroconf-discover.so
101 _pick v4l2 usr/bin/pw-v4l2 usr/lib/pipewire-$_ver/v4l2
104 mkdir -p "$pkgdir/etc/alsa/conf.d"
105 ln -st "$pkgdir/etc/alsa/conf.d" \
106 /usr/share/alsa/alsa.conf.d/50-pipewire.conf
108 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
111 package_alsa-card-profiles() {
112 pkgdesc+=" - ALSA card profiles"
118 package_pipewire-docs() {
119 pkgdesc+=" - documentation"
123 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
126 package_pipewire-alsa() {
127 pkgdesc+=" - ALSA configuration"
128 depends=(pipewire-session-manager)
129 provides=(pulseaudio-alsa)
131 mkdir -p "$pkgdir/etc/alsa/conf.d"
132 ln -st "$pkgdir/etc/alsa/conf.d" \
133 /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf
135 install -Dm644 /dev/null \
136 "$pkgdir/usr/share/pipewire/media-session.d/with-alsa"
138 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
141 package_pipewire-jack() {
142 pkgdesc+=" - JACK support"
143 license+=(GPL2) # libjackserver
144 depends=(pipewire-session-manager libpipewire-$_ver.so)
148 install -Dm644 /dev/null \
149 "$pkgdir/usr/share/pipewire/media-session.d/with-jack"
151 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
154 package_pipewire-pulse() {
155 pkgdesc+=" - PulseAudio replacement"
156 depends=(pipewire-session-manager libpipewire-$_ver.so libpulse.so
157 libavahi-{client,common}.so)
158 provides=(pulseaudio pulseaudio-bluetooth)
159 conflicts=(pulseaudio pulseaudio-bluetooth)
160 install=pipewire-pulse.install
164 install -Dm644 /dev/null \
165 "$pkgdir/usr/share/pipewire/media-session.d/with-pulseaudio"
167 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
170 package_gst-plugin-pipewire() {
171 pkgdesc="Multimedia graph framework - pipewire plugin"
172 depends=(pipewire-session-manager libpipewire-$_ver.so gst-plugins-base-libs)
176 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
179 package_pipewire-zeroconf() {
180 pkgdesc+=" - Zeroconf support"
181 depends=(pipewire libpipewire-$_ver.so libavahi-{client,common}.so)
183 mv zeroconf/* "$pkgdir"
185 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
188 package_pipewire-v4l2() {
189 pkgdesc+=" - V4L2 interceptor"
190 depends=(pipewire-session-manager libpipewire-$_ver.so)
194 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING