blob: 79d824e53ac183b08b53e42a8c27f4bab08c45f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
|
# Maintainer: David P. <megver83@parabola.nu>
# Maintainer (Arch): David Runge <dvzrv@archlinux.org>
# Maintainer (Arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor (Arch): Jan de Groot <jgc@archlinux.org>
# differences with the Artix package:
# - install an XDG autostart script to launch pipewire-pulse, like Gentoo
pkgbase=pipewire
pkgname=(pipewire alsa-card-profiles pipewire-docs pipewire-alsa pipewire-jack
pipewire-pulse gst-plugin-pipewire pipewire-zeroconf pipewire-v4l2
pipewire-x11-bell)
_commit=ebc775674a0cf254cebd6d4694944006405807e3 # tags/0.3.51
pkgver=0.3.51
pkgrel=1
pkgrel+=.nonsystemd1
epoch=1
pkgdesc="Low-latency audio/video router and processor"
url="https://pipewire.org"
arch=(x86_64)
arch+=(i686 armv7h)
license=(MIT)
makedepends=(git meson doxygen graphviz python-docutils valgrind libpulse
alsa-lib libusb gst-plugins-base rtkit dbus sdl2 ncurses
libcanberra libsndfile bluez-libs sbc libldac libfreeaptx
libfdk-aac avahi lilv webrtc-audio-processing libx11 libxfixes)
checkdepends=(desktop-file-utils)
options=(debug)
source=("git+https://gitlab.freedesktop.org/pipewire/pipewire.git#commit=$_commit"
pipewire.desktop pipewire-launcher)
sha256sums=('SKIP'
'b5b68d711ff070b6217c4da5de0c5488b36a012b7e5484bf1d89d1969a778026'
'47f4d64dd4583963ce493828c171b608949dcc9f6e20d5dc2cdcb3a2f3ba6bac')
pkgver() {
cd pipewire
git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd pipewire
# remove export of LD_LIBRARY_PATH for pw-jack as it would add /usr/lib
sed -i '/LD_LIBRARY_PATH/d' pipewire-jack/src/pw-jack.in
}
build() {
local meson_options=(
-D docs=enabled
-D jack=disabled
-D jack-devel=true
-D libjack-path=/usr/lib
-D libcamera=disabled
-D udevrulesdir=/usr/lib/udev/rules.d
-D systemd=disabled
-D roc=disabled
-D session-managers=[]
)
arch-meson pipewire build "${meson_options[@]}"
meson compile -C build
}
check() {
meson test -C build --print-errorlogs
}
_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
}
_ver=${pkgver:0:3}
package_pipewire() {
license+=(LGPL) # libspa-alsa
depends=(alsa-card-profiles libdbus-1.so libncursesw.so libsndfile.so
libudev.so libusb-1.0.so libasound.so libbluetooth.so
libsbc.so libldacBT_enc.so libfreeaptx.so libfdk-aac.so liblilv-0.so
libwebrtc_audio_processing.so)
optdepends=('pipewire-docs: Documentation'
'pipewire-session-manager: Session manager'
'pipewire-alsa: ALSA configuration'
'pipewire-jack: JACK support'
'pipewire-pulse: PulseAudio replacement'
'gst-plugin-pipewire: GStreamer plugin'
'pipewire-zeroconf: Zeroconf support'
'pipewire-v4l2: V4L2 interceptor'
'pipewire-x11-bell: X11 bell'
'realtime-privileges: realtime privileges with rt module'
'rtkit: realtime privileges with rtkit module')
provides=(libpipewire-$_ver.so)
meson install -C build --destdir "$pkgdir"
( cd "$pkgdir"
_pick acp usr/lib/udev
_pick acp usr/share/alsa-card-profile
_pick docs usr/share/doc
_pick jack usr/bin/pw-jack
_pick jack usr/include/jack
_pick jack usr/lib/libjack*
_pick jack usr/lib/pkgconfig/jack.pc
_pick jack usr/share/man/man1/pw-jack.1
_pick jack usr/share/pipewire/jack.conf
_pick pulse usr/bin/pipewire-pulse
_pick pulse usr/lib/pipewire-$_ver/libpipewire-module-protocol-pulse.so
_pick pulse usr/lib/pipewire-$_ver/libpipewire-module-pulse-tunnel.so
_pick gst usr/lib/gstreamer-1.0
_pick zeroconf usr/lib/pipewire-$_ver/libpipewire-module-{raop,zeroconf}-discover.so
_pick v4l2 usr/bin/pw-v4l2 usr/lib/pipewire-$_ver/v4l2
_pick x11-bell usr/lib/pipewire-$_ver/libpipewire-module-x11-bell.so
)
mkdir -p "$pkgdir/etc/alsa/conf.d"
ln -st "$pkgdir/etc/alsa/conf.d" \
/usr/share/alsa/alsa.conf.d/50-pipewire.conf
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
}
package_alsa-card-profiles() {
pkgdesc+=" - ALSA card profiles"
license=(LGPL)
mv acp/* "$pkgdir"
}
package_pipewire-docs() {
pkgdesc+=" - documentation"
mv docs/* "$pkgdir"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
}
package_pipewire-alsa() {
pkgdesc+=" - ALSA configuration"
depends=(pipewire-session-manager)
provides=(pulseaudio-alsa)
mkdir -p "$pkgdir/etc/alsa/conf.d"
ln -st "$pkgdir/etc/alsa/conf.d" \
/usr/share/alsa/alsa.conf.d/99-pipewire-default.conf
install -Dm644 /dev/null \
"$pkgdir/usr/share/pipewire/media-session.d/with-alsa"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
}
package_pipewire-jack() {
pkgdesc+=" - JACK support"
license+=(GPL2) # libjackserver
depends=(pipewire-session-manager libpipewire-$_ver.so sh)
optdepends=('jack-example-tools: for official JACK example-clients and tools')
conflicts=(jack jack2)
provides=(jack libjack.so libjackserver.so libjacknet.so)
mv jack/* "$pkgdir"
install -Dm644 /dev/null \
"$pkgdir/usr/share/pipewire/media-session.d/with-jack"
# directories for overrides
mkdir -p "$pkgdir/etc/pipewire/jack.conf.d"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
}
package_pipewire-pulse() {
pkgdesc+=" - PulseAudio replacement"
depends=(pipewire-session-manager libpipewire-$_ver.so libpulse.so
libavahi-{client,common}.so)
provides=(pulseaudio pulseaudio-bluetooth)
conflicts=(pulseaudio pulseaudio-bluetooth)
mv pulse/* "$pkgdir"
install -Dm644 /dev/null \
"$pkgdir/usr/share/pipewire/media-session.d/with-pulseaudio"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
# borrowed from Gentoo's media-video/pipewire, with pipewire-media-session support
mkdir -p "$pkgdir/etc/xdg/autostart"
install -m644 pipewire.desktop "$pkgdir/etc/xdg/autostart/pipewire.desktop"
install -m755 pipewire-launcher "$pkgdir/usr/bin/pipewire-launcher"
}
package_gst-plugin-pipewire() {
pkgdesc="Multimedia graph framework - pipewire plugin"
depends=(pipewire-session-manager libpipewire-$_ver.so gst-plugins-base-libs)
mv gst/* "$pkgdir"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
}
package_pipewire-zeroconf() {
pkgdesc+=" - Zeroconf support"
depends=(pipewire libpipewire-$_ver.so libavahi-{client,common}.so)
mv zeroconf/* "$pkgdir"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
}
package_pipewire-v4l2() {
pkgdesc+=" - V4L2 interceptor"
depends=(pipewire-session-manager libpipewire-$_ver.so sh)
mv v4l2/* "$pkgdir"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
}
package_pipewire-x11-bell() {
pkgdesc+=" - X11 bell"
depends=(pipewire libpipewire-$_ver.so libx11 libxfixes libcanberra.so)
mv x11-bell/* "$pkgdir"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
}
# vim:set sw=2 et:
|