mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
99 lines
2.5 KiB
Bash
99 lines
2.5 KiB
Bash
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
||
# Maintainer: Jan de Groot <jgc@archlinux.org>
|
||
|
||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||
# - remove makedepend on valgrind
|
||
# - patch to check for and link with libatomic
|
||
|
||
pkgbase=pipewire
|
||
pkgname=(pipewire pipewire-docs pipewire-jack pipewire-pulse)
|
||
pkgver=0.3.2
|
||
pkgrel=1
|
||
pkgdesc="Server and user space API to deal with multimedia pipelines"
|
||
url="https://pipewire.org"
|
||
license=(LGPL2.1)
|
||
arch=(x86_64)
|
||
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)
|
||
_commit=f0f3a0a66032cf693a979dae6187cac07fa353ee # tags/0.3.2
|
||
source=("git+https://github.com/PipeWire/pipewire#commit=$_commit"
|
||
0001-atomic.patch)
|
||
sha256sums=('SKIP'
|
||
'2e22f850618fcd77cab357ce8d8c2382ccf37a4fd0f782d999a81202bfabc503')
|
||
|
||
pkgver() {
|
||
cd $pkgbase
|
||
git describe --tags | sed 's/-/+/g'
|
||
}
|
||
|
||
prepare() {
|
||
cd $pkgbase
|
||
patch -p1 -i ../0001-atomic.patch
|
||
}
|
||
|
||
build() {
|
||
# warning: ‘-Wformat-security’ ignored without ‘-Wformat’ [-Wformat-security]
|
||
CFLAGS+=" -Wformat"
|
||
|
||
arch-meson $pkgbase build \
|
||
-D docs=true \
|
||
-D man=true
|
||
|
||
ninja -C build
|
||
}
|
||
|
||
check() {
|
||
meson test -C build --print-errorlogs
|
||
}
|
||
|
||
_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
|
||
}
|
||
|
||
package_pipewire() {
|
||
depends=(gstreamer gst-plugins-base sbc rtkit vulkan-icd-loader bluez-libs
|
||
libdbus-1.so libsndfile.so)
|
||
optdepends=('pipewire-docs: Documentation'
|
||
'pipewire-jack: JACK support'
|
||
'pipewire-pulse: PulseAudio support')
|
||
provides=(libpipewire-${pkgver:0:3}.so)
|
||
backup=(etc/pipewire/pipewire.conf)
|
||
install=pipewire.install
|
||
|
||
DESTDIR="$pkgdir" meson install -C build
|
||
|
||
cd "$pkgdir"
|
||
|
||
_pick docs usr/share/doc
|
||
|
||
_pick pulse usr/lib/libpulse*
|
||
|
||
_pick jack usr/lib/spa-0.2/jack
|
||
_pick jack usr/lib/libjack*
|
||
}
|
||
|
||
package_pipewire-docs() {
|
||
pkgdesc+=" (documentation)"
|
||
mv docs/* "$pkgdir"
|
||
}
|
||
|
||
package_pipewire-jack() {
|
||
pkgdesc+=" (JACK support)"
|
||
depends=(libpipewire-${pkgver:0:3}.so libjack.so)
|
||
provides=(libjack-pw.so)
|
||
mv jack/* "$pkgdir"
|
||
}
|
||
|
||
package_pipewire-pulse() {
|
||
pkgdesc+=" (PulseAudio support)"
|
||
depends=(libpipewire-${pkgver:0:3}.so libpulse.so libglib-2.0.so)
|
||
provides=(libpulse{,-simple,-mainloop-glib}-pw.so)
|
||
mv pulse/* "$pkgdir"
|
||
}
|