PKGBUILDs/extra/pipewire/PKGBUILD

192 lines
5.2 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
2019-06-15 02:24:38 +00:00
pkgbase=pipewire
2021-03-04 19:31:08 +00:00
pkgname=(pipewire alsa-card-profiles pipewire-docs pipewire-media-session
2021-05-19 14:06:28 +00:00
pipewire-alsa pipewire-jack pipewire-pulse gst-plugin-pipewire
pipewire-zeroconf)
2021-06-09 14:09:29 +00:00
pkgver=0.3.30
2021-06-11 00:02:42 +00:00
pkgrel=2
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-05-19 14:06:28 +00:00
makedepends=(git meson doxygen xmltoman libpulse alsa-lib
2021-03-04 19:31:08 +00:00
gst-plugins-base rtkit dbus sdl2 ncurses libsndfile bluez-libs sbc
2021-05-19 14:06:28 +00:00
libldac libopenaptx libfdk-aac vulkan-headers vulkan-icd-loader
2021-06-03 14:05:40 +00:00
avahi webrtc-audio-processing)
2021-01-21 01:01:43 +00:00
checkdepends=(desktop-file-utils)
2021-06-09 14:09:29 +00:00
_commit=e857856be7b64d562cdcc01c43933218a68b225e # tags/0.3.30
2021-03-18 17:41:29 +00:00
source=("git+https://gitlab.freedesktop.org/pipewire/pipewire.git#commit=$_commit")
2020-09-11 23:55:36 +00:00
sha256sums=('SKIP')
2018-03-25 15:52:40 +00:00
pkgver() {
2021-06-03 14:05:40 +00:00
cd pipewire
2018-03-25 15:52:40 +00:00
git describe --tags | sed 's/-/+/g'
}
prepare() {
2021-06-03 14:05:40 +00:00
cd pipewire
2021-06-11 00:02:42 +00:00
# https://bugs.archlinux.org/task/71157
git cherry-pick -n d8e0176bcfcd 23a0f29d4878 283e13629c0e 1c513464c83a
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-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
libudev.so libasound.so libsystemd.so libbluetooth.so libsbc.so
2021-06-03 14:05:40 +00:00
libldacBT_enc.so libopenaptx.so libfdk-aac.so libvulkan.so
libwebrtc_audio_processing.so)
2020-03-08 15:51:55 +00:00
optdepends=('pipewire-docs: Documentation'
2021-03-04 19:31:08 +00:00
'pipewire-media-session: Default 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-06-03 14:05:40 +00:00
'gst-plugin-pipewire: GStreamer support'
'pipewire-zeroconf: Zeroconf support')
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 pms usr/bin/pipewire-media-session
_pick pms usr/lib/systemd/user/pipewire-media-session.service
_pick pms usr/share/pipewire/media-session.d/*.conf
2020-03-08 15:51:55 +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
_pick jack usr/share/pipewire/{jack.conf,media-session.d/with-jack}
2021-03-04 19:31:08 +00:00
2021-06-03 14:05:40 +00:00
_pick pulse usr/lib/pipewire-$_ver/libpipewire-module-pulse-tunnel.so
_pick pulse usr/share/pipewire/media-session.d/with-pulseaudio
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-06-03 14:05:40 +00:00
_pick zeroconf usr/lib/pipewire-$_ver/libpipewire-module-zeroconf-discover.so
)
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-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-03-04 19:31:08 +00:00
package_pipewire-media-session() {
pkgdesc+=" - Session manager"
depends=(pipewire libpipewire-$_ver.so)
install=pipewire-media-session.install
2021-05-19 14:06:28 +00:00
2021-03-04 19:31:08 +00:00
mv pms/* "$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-03-04 19:31:08 +00:00
}
2021-02-19 00:52:36 +00:00
package_pipewire-alsa() {
pkgdesc+=" - ALSA configuration"
2021-03-04 19:31:08 +00:00
depends=(pipewire-media-session)
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-06-03 14:05:40 +00:00
/usr/share/alsa/alsa.conf.d/{50-pipewire,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-03-04 19:31:08 +00:00
depends=(pipewire-media-session 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-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-03-04 19:31:08 +00:00
depends=(pipewire-media-session libpulse)
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-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-03-04 19:31:08 +00:00
depends=(pipewire-media-session 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
# vim:set sw=2 et: