PKGBUILDs/extra/pipewire/PKGBUILD

101 lines
2.5 KiB
Bash
Raw Normal View History

2020-02-21 01:47:54 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2018-03-25 15:52:40 +00:00
# Maintainer: Jan de Groot <jgc@archlinux.org>
# 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-03-08 15:51:55 +00:00
pkgname=(pipewire pipewire-docs pipewire-jack pipewire-pulse)
2020-05-01 12:49:27 +00:00
pkgver=0.3.4
2020-03-08 15:51:55 +00:00
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-05-01 12:49:27 +00:00
_commit=33398d7de83fad1c67c691e0712e3e0108c5e966 # tags/0.3.4
2020-03-12 00:53:10 +00:00
source=("git+https://github.com/PipeWire/pipewire#commit=$_commit"
0001-atomic.patch)
sha256sums=('SKIP'
2020-05-01 12:49:27 +00:00
'3ae386bc7ad38177e7f1729668a5d035535dc4f234b97a5f60ab774316a3a82c')
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-03-12 00:53:10 +00:00
patch -p1 -i ../0001-atomic.patch
2018-03-25 15:52:40 +00:00
}
build() {
2020-03-08 15:51:55 +00:00
# warning: -Wformat-security ignored without -Wformat [-Wformat-security]
CFLAGS+=" -Wformat"
2019-06-15 02:24:38 +00:00
arch-meson $pkgbase build \
2018-09-02 05:00:46 +00:00
-D docs=true \
2018-11-06 00:22:56 +00:00
-D man=true
2020-02-21 01:47:54 +00:00
2018-03-25 15:52:40 +00:00
ninja -C build
}
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"
_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"
}