PKGBUILDs/extra/pipewire/PKGBUILD

110 lines
2.8 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
2020-03-12 00:53:10 +00:00
# - patch to check for and link with libatomic
2018-03-25 15:52:40 +00:00
2019-06-15 02:24:38 +00:00
pkgbase=pipewire
2020-05-13 00:01:53 +00:00
pkgname=(pipewire pipewire-docs pipewire-jack pipewire-pulse pipewire-alsa)
2020-08-24 17:24:42 +00:00
pkgver=0.3.10
pkgrel=1
2018-03-25 15:52:40 +00:00
pkgdesc="Server and user space API to deal with multimedia pipelines"
url="https://pipewire.org"
license=(LGPL2.1)
arch=(x86_64)
2020-03-08 15:51:55 +00:00
makedepends=(git meson doxygen graphviz xmltoman jack2 libpulse
alsa-lib gstreamer gst-plugins-base sbc rtkit vulkan-icd-loader
dbus libsndfile bluez-libs vulkan-headers)
2020-08-24 17:24:42 +00:00
_commit=69be14186e20ffaa42c4a635be5da49173c45b97 # tags/0.3.10
2020-03-12 00:53:10 +00:00
source=("git+https://github.com/PipeWire/pipewire#commit=$_commit"
2020-05-13 13:08:09 +00:00
0001-atomic.patch)
2020-03-12 00:53:10 +00:00
sha256sums=('SKIP'
2020-08-15 03:30:50 +00:00
'4453fecf0fc9dbb3399018e43f032d2f178f521f4d44482be87ff207b8d9e789')
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
2020-08-15 03:30:50 +00:00
2020-03-12 00:53:10 +00:00
patch -p1 -i ../0001-atomic.patch
2018-03-25 15:52:40 +00:00
}
build() {
2019-06-15 02:24:38 +00:00
arch-meson $pkgbase build \
2018-09-02 05:00:46 +00:00
-D docs=true \
2020-08-15 03:30:50 +00:00
-D udevrulesdir=/usr/lib/udev/rules.d
2020-02-21 01:47:54 +00:00
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() {
2020-03-08 15:51:55 +00:00
depends=(gstreamer gst-plugins-base sbc rtkit vulkan-icd-loader bluez-libs
2020-05-01 12:49:27 +00:00
libdbus-1.so libsndfile.so libudev.so libasound.so libsystemd.so
libglib-2.0.so libgobject-2.0.so)
2020-03-08 15:51:55 +00:00
optdepends=('pipewire-docs: Documentation'
'pipewire-jack: JACK support'
'pipewire-pulse: PulseAudio support')
2020-05-01 12:49:27 +00:00
provides=(libpipewire-$_ver.so)
2020-02-21 01:47:54 +00:00
backup=(etc/pipewire/pipewire.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"
2020-05-13 00:01:53 +00:00
mkdir -p etc/alsa/conf.d
ln -st etc/alsa/conf.d /usr/share/alsa/alsa.conf.d/50-pipewire.conf
2020-02-21 01:47:54 +00:00
_pick docs usr/share/doc
2020-03-08 15:51:55 +00:00
2020-05-01 12:49:27 +00:00
_pick pulse usr/bin/pw-pulse usr/lib/pipewire-$_ver/pulse
2020-03-08 15:51:55 +00:00
2020-05-01 12:49:27 +00:00
_pick jack usr/bin/pw-jack usr/lib/pipewire-$_ver/jack
2020-03-08 15:51:55 +00:00
_pick jack usr/lib/spa-0.2/jack
2019-06-15 02:24:38 +00:00
}
package_pipewire-docs() {
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
package_pipewire-jack() {
pkgdesc+=" (JACK support)"
2020-05-01 12:49:27 +00:00
depends=(libpipewire-$_ver.so libjack.so)
2020-03-08 15:51:55 +00:00
mv jack/* "$pkgdir"
}
package_pipewire-pulse() {
pkgdesc+=" (PulseAudio support)"
2020-05-01 12:49:27 +00:00
depends=(libpipewire-$_ver.so libglib-2.0.so)
2020-03-08 15:51:55 +00:00
mv pulse/* "$pkgdir"
}
2020-05-13 00:01:53 +00:00
package_pipewire-alsa() {
pkgdesc="ALSA Configuration for PipeWire"
depends=(libpipewire-$_ver.so)
mkdir -p "$pkgdir/etc/alsa/conf.d"
ln -st "$pkgdir/etc/alsa/conf.d" /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf
}