# Template file for 'libpipewire0.2'
pkgname=libpipewire0.2
version=0.2.7
revision=2
wrksrc=pipewire-${version}
build_style=meson
configure_args="-Dgstreamer=disabled -Ddocs=false -Dsystemd=false"
hostmakedepends="pkg-config"
makedepends="dbus-devel alsa-lib-devel eudev-libudev-devel"
short_desc="Server and user space API to deal with multimedia pipelines (v0.2)"
maintainer="Artur Sinila <opensource@logarithmus.dev>"
license="MIT"
homepage="https://pipewire.org/"
changelog="https://gitlab.freedesktop.org/pipewire/pipewire/-/raw/master/NEWS"
distfiles="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${version}/pipewire-${version}.tar.gz"
checksum=bfaa0f6ae6c0791e2e0b59234d399753bf24f1b33dbf587682363a8463dd8df1

if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
	makedepends+=" libatomic-devel"
	LDFLAGS+=" -latomic"
fi

post_install() {
	rm -r ${DESTDIR}/{etc,usr/bin}
	vlicense LICENSE
}

libpipewire0.2-devel_package() {
	depends="${sourcepkg}-${version}_${revision}"
	short_desc+=" - pipewire and libspa development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove usr/lib/libpipewire-0.2.so
	}
}
