PKGBUILDs/extra/pipewire/PKGBUILD

148 lines
4.1 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
pipewire-alsa pipewire-jack pipewire-pulse gst-plugin-pipewire)
2021-03-18 17:41:29 +00:00
pkgver=0.3.24
2021-03-04 19:31:08 +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-01-21 01:01:43 +00:00
license=(LGPL)
2018-03-25 15:52:40 +00:00
arch=(x86_64)
2021-03-04 19:31:08 +00:00
makedepends=(git meson doxygen graphviz xmltoman libpulse alsa-lib
gst-plugins-base rtkit dbus sdl2 ncurses libsndfile bluez-libs sbc
2021-03-18 17:41:29 +00:00
libldac libopenaptx libfdk-aac vulkan-headers vulkan-icd-loader)
2021-01-21 01:01:43 +00:00
checkdepends=(desktop-file-utils)
2021-03-18 17:41:29 +00:00
_commit=c81d44e8a9497899d01bcc3054b6aa845e7a066e # tags/0.3.24
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() {
2019-06-15 02:24:38 +00:00
cd $pkgbase
2018-03-25 15:52:40 +00:00
git describe --tags | sed 's/-/+/g'
}
prepare() {
2019-06-15 02:24:38 +00:00
cd $pkgbase
2018-03-25 15:52:40 +00:00
}
build() {
2019-06-15 02:24:38 +00:00
arch-meson $pkgbase build \
2021-03-18 17:41:29 +00:00
-D docs=enabled \
-D jack=disabled \
-D libcamera=disabled \
2020-08-15 03:30:50 +00:00
-D udevrulesdir=/usr/lib/udev/rules.d
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-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-03-18 17:41:29 +00:00
libldacBT_enc.so libopenaptx.so libfdk-aac.so libvulkan.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'
'gst-plugin-pipewire: GStreamer support')
2020-05-01 12:49:27 +00:00
provides=(libpipewire-$_ver.so)
2021-03-04 19:31:08 +00:00
backup=(etc/pipewire/{pipewire{,-pulse},client{,-rt}}.conf)
2019-06-15 02:24:38 +00:00
install=pipewire.install
2018-07-18 20:53:42 +00:00
DESTDIR="$pkgdir" meson install -C build
2019-06-15 02:24:38 +00:00
2020-02-21 01:47:54 +00:00
cd "$pkgdir"
2021-02-19 00:52:36 +00:00
_pick acp usr/lib/udev
_pick acp usr/share/alsa-card-profile
2020-05-13 00:01:53 +00:00
2020-02-21 01:47:54 +00:00
_pick docs usr/share/doc
2020-03-08 15:51:55 +00:00
2021-03-04 19:31:08 +00:00
_pick pms etc/pipewire/media-session.d/*.conf
_pick pms usr/bin/pipewire-media-session
_pick pms usr/lib/systemd/user/pipewire-media-session.service
2021-02-19 00:52:36 +00:00
_pick jack etc/pipewire/{jack.conf,media-session.d/with-jack}
2020-05-01 12:49:27 +00:00
_pick jack usr/bin/pw-jack usr/lib/pipewire-$_ver/jack
2020-11-05 00:49:44 +00:00
_pick jack usr/share/man/man1/pw-jack.1
2020-10-05 18:52:56 +00:00
2020-12-03 02:27:41 +00:00
_pick pulse etc/pipewire/media-session.d/with-pulseaudio
_pick gst usr/lib/gstreamer-1.0
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"
mv acp/* "$pkgdir"
2019-06-15 02:24:38 +00:00
}
package_pipewire-docs() {
2021-02-19 00:52:36 +00:00
pkgdesc+=" - documentation"
2020-02-21 01:47:54 +00:00
mv docs/* "$pkgdir"
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)
backup=(etc/pipewire/media-session.d/media-session.conf
etc/pipewire/media-session.d/{alsa,bluez,v4l2}-monitor.conf)
install=pipewire-media-session.install
mv pms/* "$pkgdir"
}
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" \
/usr/share/alsa/alsa.conf.d/{50-pipewire,99-pipewire-default}.conf
install -Dm644 /dev/null "$pkgdir/etc/pipewire/media-session.d/with-alsa"
}
2020-03-08 15:51:55 +00:00
package_pipewire-jack() {
2021-02-19 00:52:36 +00:00
pkgdesc+=" - JACK support"
2021-03-04 19:31:08 +00:00
depends=(pipewire-media-session libpipewire-$_ver.so)
2021-02-19 00:52:36 +00:00
backup=(etc/pipewire/jack.conf)
2020-03-08 15:51:55 +00:00
mv jack/* "$pkgdir"
}
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
2020-03-08 15:51:55 +00:00
mv pulse/* "$pkgdir"
}
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)
2020-12-03 02:27:41 +00:00
mv gst/* "$pkgdir"
}
2021-01-21 01:01:43 +00:00
# vim:set sw=2 et: