PKGBUILDs/extra/pipewire/PKGBUILD

209 lines
5.9 KiB
Bash
Raw Normal View History

2020-06-10 18:52:51 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2020-08-15 03:30:50 +00:00
# Contributor: Jan de Groot <jgc@archlinux.org>
2018-03-25 15:52:40 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove makedepend on valgrind
2021-11-10 03:13:51 +00:00
# - patch to disable neon
# - cherry-pick upstream patch to fix neon disable
2018-03-25 15:52:40 +00:00
2019-06-15 02:24:38 +00:00
pkgbase=pipewire
2021-10-24 22:25:16 +00:00
pkgname=(pipewire alsa-card-profiles pipewire-docs pipewire-alsa pipewire-jack
pipewire-pulse gst-plugin-pipewire pipewire-zeroconf pipewire-v4l2)
2021-12-16 14:05:10 +00:00
pkgver=0.3.42
2021-08-05 18:18:51 +00:00
pkgrel=1
2021-01-21 01:01:43 +00:00
epoch=1
2021-02-19 00:52:36 +00:00
pkgdesc="Low-latency audio/video router and processor"
2018-03-25 15:52:40 +00:00
url="https://pipewire.org"
2021-05-19 14:06:28 +00:00
license=(MIT)
2018-03-25 15:52:40 +00:00
arch=(x86_64)
2021-09-16 15:27:03 +00:00
makedepends=(git meson doxygen graphviz python-docutils libpulse
alsa-lib libusb gst-plugins-base rtkit dbus sdl2 ncurses libsndfile
2021-12-13 13:42:18 +00:00
bluez-libs sbc libldac libfreeaptx libfdk-aac avahi lilv
2021-09-16 15:27:03 +00:00
webrtc-audio-processing)
2021-01-21 01:01:43 +00:00
checkdepends=(desktop-file-utils)
2021-12-16 14:05:10 +00:00
_commit=3cac296ee09091ef64a3daa1d62529f7c13af0f2 # tags/0.3.42
2021-11-10 03:13:51 +00:00
source=("git+https://gitlab.freedesktop.org/pipewire/pipewire.git#commit=$_commit"
0001-disable-neon.patch)
sha256sums=('SKIP'
'03692caee572d9e9c5d4f68986533c24ed84163c1ad607c7a13ef50cc3f8558e')
2018-03-25 15:52:40 +00:00
pkgver() {
2021-06-03 14:05:40 +00:00
cd pipewire
2021-12-16 14:05:10 +00:00
git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
2018-03-25 15:52:40 +00:00
}
prepare() {
2021-06-03 14:05:40 +00:00
cd pipewire
2021-11-10 03:13:51 +00:00
if [[ $CARCH != "aarch64" ]]; then
git cherry-pick -n 651f0decea5f83730c271e9bed03cdd0048fcd49
patch -p1 -i ../0001-disable-neon.patch
fi
2018-03-25 15:52:40 +00:00
}
build() {
2021-06-09 14:09:29 +00:00
local meson_options=(
-D docs=enabled
-D jack=disabled
-D libcamera=disabled
2020-08-15 03:30:50 +00:00
-D udevrulesdir=/usr/lib/udev/rules.d
2021-06-28 22:58:38 +00:00
-D roc=disabled
2021-10-24 22:25:16 +00:00
-D session-managers=[]
2021-06-09 14:09:29 +00:00
)
arch-meson pipewire build "${meson_options[@]}"
2020-06-10 18:52:51 +00:00
meson compile -C build
2018-03-25 15:52:40 +00:00
}
check() {
2019-06-15 02:24:38 +00:00
meson test -C build --print-errorlogs
2018-03-25 15:52:40 +00:00
}
2020-02-21 01:47:54 +00:00
_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
}
2020-05-01 12:49:27 +00:00
_ver=${pkgver:0:3}
2019-06-15 02:24:38 +00:00
package_pipewire() {
2021-05-19 14:06:28 +00:00
license+=(LGPL) # libspa-alsa
2021-02-19 00:52:36 +00:00
depends=(rtkit alsa-card-profiles libdbus-1.so libncursesw.so libsndfile.so
2021-06-28 22:58:38 +00:00
libudev.so libusb-1.0.so libasound.so libsystemd.so libbluetooth.so
2021-12-13 13:42:18 +00:00
libsbc.so libldacBT_enc.so libfreeaptx.so libfdk-aac.so liblilv-0.so
2021-06-03 14:05:40 +00:00
libwebrtc_audio_processing.so)
2020-03-08 15:51:55 +00:00
optdepends=('pipewire-docs: Documentation'
2021-10-24 22:25:16 +00:00
'pipewire-session-manager: Session manager'
2021-02-19 00:52:36 +00:00
'pipewire-alsa: ALSA configuration'
2020-03-08 15:51:55 +00:00
'pipewire-jack: JACK support'
2021-02-19 00:52:36 +00:00
'pipewire-pulse: PulseAudio replacement'
2021-10-24 22:25:16 +00:00
'gst-plugin-pipewire: GStreamer plugin'
'pipewire-zeroconf: Zeroconf support'
'pipewire-v4l2: V4L2 interceptor')
2020-05-01 12:49:27 +00:00
provides=(libpipewire-$_ver.so)
2019-06-15 02:24:38 +00:00
install=pipewire.install
2021-05-19 14:06:28 +00:00
meson install -C build --destdir "$pkgdir"
2021-06-03 14:05:40 +00:00
( cd "$pkgdir"
2019-06-15 02:24:38 +00:00
2021-06-03 14:05:40 +00:00
_pick acp usr/lib/udev
_pick acp usr/share/alsa-card-profile
2020-02-21 01:47:54 +00:00
2021-06-03 14:05:40 +00:00
_pick docs usr/share/doc
2020-05-13 00:01:53 +00:00
2021-06-03 14:05:40 +00:00
_pick jack usr/bin/pw-jack usr/lib/pipewire-$_ver/jack
_pick jack usr/share/man/man1/pw-jack.1
2021-10-24 22:25:16 +00:00
_pick jack usr/share/pipewire/jack.conf
2021-03-04 19:31:08 +00:00
2021-06-28 22:58:38 +00:00
_pick pulse usr/bin/pipewire-pulse
_pick pulse usr/lib/pipewire-$_ver/libpipewire-module-protocol-pulse.so
2021-06-03 14:05:40 +00:00
_pick pulse usr/lib/pipewire-$_ver/libpipewire-module-pulse-tunnel.so
2021-06-28 22:58:38 +00:00
_pick pulse usr/lib/systemd/user/pipewire-pulse.*
2020-10-05 18:52:56 +00:00
2021-06-03 14:05:40 +00:00
_pick gst usr/lib/gstreamer-1.0
2020-12-03 02:27:41 +00:00
2021-12-13 13:42:18 +00:00
_pick zeroconf usr/lib/pipewire-$_ver/libpipewire-module-{raop,zeroconf}-discover.so
2021-10-24 22:25:16 +00:00
_pick v4l2 usr/bin/pw-v4l2 usr/lib/pipewire-$_ver/v4l2
2021-06-03 14:05:40 +00:00
)
2021-05-19 14:06:28 +00:00
2021-08-26 20:36:16 +00:00
mkdir -p "$pkgdir/etc/alsa/conf.d"
ln -st "$pkgdir/etc/alsa/conf.d" \
/usr/share/alsa/alsa.conf.d/50-pipewire.conf
2021-06-03 14:05:40 +00:00
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
2021-02-19 00:52:36 +00:00
}
2020-12-03 02:27:41 +00:00
2021-02-19 00:52:36 +00:00
package_alsa-card-profiles() {
pkgdesc+=" - ALSA card profiles"
2021-05-19 14:06:28 +00:00
license=(LGPL)
2021-02-19 00:52:36 +00:00
mv acp/* "$pkgdir"
2019-06-15 02:24:38 +00:00
}
package_pipewire-docs() {
2021-02-19 00:52:36 +00:00
pkgdesc+=" - documentation"
2021-05-19 14:06:28 +00:00
2020-02-21 01:47:54 +00:00
mv docs/* "$pkgdir"
2021-05-19 14:06:28 +00:00
2021-06-03 14:05:40 +00:00
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
2018-03-25 15:52:40 +00:00
}
2020-03-08 15:51:55 +00:00
2021-02-19 00:52:36 +00:00
package_pipewire-alsa() {
pkgdesc+=" - ALSA configuration"
2021-10-24 22:25:16 +00:00
depends=(pipewire-session-manager)
2021-02-19 00:52:36 +00:00
provides=(pulseaudio-alsa)
mkdir -p "$pkgdir/etc/alsa/conf.d"
ln -st "$pkgdir/etc/alsa/conf.d" \
2021-08-26 20:36:16 +00:00
/usr/share/alsa/alsa.conf.d/99-pipewire-default.conf
2021-05-19 14:06:28 +00:00
install -Dm644 /dev/null \
"$pkgdir/usr/share/pipewire/media-session.d/with-alsa"
2021-06-03 14:05:40 +00:00
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
2021-02-19 00:52:36 +00:00
}
2020-03-08 15:51:55 +00:00
package_pipewire-jack() {
2021-02-19 00:52:36 +00:00
pkgdesc+=" - JACK support"
2021-05-19 14:06:28 +00:00
license+=(GPL2) # libjackserver
2021-10-24 22:25:16 +00:00
depends=(pipewire-session-manager libpipewire-$_ver.so)
2021-05-19 14:06:28 +00:00
2020-03-08 15:51:55 +00:00
mv jack/* "$pkgdir"
2021-05-19 14:06:28 +00:00
2021-10-24 22:25:16 +00:00
install -Dm644 /dev/null \
"$pkgdir/usr/share/pipewire/media-session.d/with-jack"
2021-06-03 14:05:40 +00:00
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
2020-03-08 15:51:55 +00:00
}
package_pipewire-pulse() {
2021-02-19 00:52:36 +00:00
pkgdesc+=" - PulseAudio replacement"
2021-10-24 22:25:16 +00:00
depends=(pipewire-session-manager libpipewire-$_ver.so libpulse.so
2021-06-28 22:58:38 +00:00
libavahi-{client,common}.so)
2020-12-03 02:27:41 +00:00
provides=(pulseaudio pulseaudio-bluetooth)
conflicts=(pulseaudio pulseaudio-bluetooth)
install=pipewire-pulse.install
2021-05-19 14:06:28 +00:00
2020-03-08 15:51:55 +00:00
mv pulse/* "$pkgdir"
2021-05-19 14:06:28 +00:00
2021-10-24 22:25:16 +00:00
install -Dm644 /dev/null \
"$pkgdir/usr/share/pipewire/media-session.d/with-pulseaudio"
2021-06-03 14:05:40 +00:00
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
2020-03-08 15:51:55 +00:00
}
2020-05-13 00:01:53 +00:00
2020-12-03 02:27:41 +00:00
package_gst-plugin-pipewire() {
pkgdesc="Multimedia graph framework - pipewire plugin"
2021-10-24 22:25:16 +00:00
depends=(pipewire-session-manager libpipewire-$_ver.so gst-plugins-base-libs)
2021-05-19 14:06:28 +00:00
2020-12-03 02:27:41 +00:00
mv gst/* "$pkgdir"
2021-05-19 14:06:28 +00:00
2021-06-03 14:05:40 +00:00
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
2021-05-19 14:06:28 +00:00
}
package_pipewire-zeroconf() {
pkgdesc+=" - Zeroconf support"
depends=(pipewire libpipewire-$_ver.so libavahi-{client,common}.so)
mv zeroconf/* "$pkgdir"
2021-06-03 14:05:40 +00:00
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
2020-12-03 02:27:41 +00:00
}
2021-01-21 01:01:43 +00:00
2021-10-24 22:25:16 +00:00
package_pipewire-v4l2() {
pkgdesc+=" - V4L2 interceptor"
depends=(pipewire-session-manager libpipewire-$_ver.so)
mv v4l2/* "$pkgdir"
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 pipewire/COPYING
}
2021-01-21 01:01:43 +00:00
# vim:set sw=2 et: