# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=obs-studio
pkgver=20.1.3
pkgrel=0
pkgdesc="Free and open source software for live streaming and screen recording"
url="https://obsproject.com/"
arch="all !aarch64 !armhf !ppc64le"
license="GPL-2.0"
options="!check"
makedepends="cmake ffmpeg-dev libxinerama-dev
	qt5-qtbase-dev qt5-x11extras-dev x264-dev fontconfig-dev
	libxcomposite-dev freetype-dev libx11-dev mesa-dev curl-dev
	pulseaudio-dev jack-dev vlc-dev alsa-lib-dev fdk-aac-dev speexdsp-dev
	v4l-utils-dev jansson-dev eudev-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/jp9000/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	mkdir build
	default_prepare
}

build() {
	cd "$builddir"/build
	cmake \
		-DUNIX_STRUCTURE=1 \
		-DCMAKE_INSTALL_PREFIX=/usr ..
	make
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

sha512sums="9d7c6892fe8940df6c1f1686f07722ea554b5996e72b702758d670a75f1220de59295c0a7b8b6445825a86623521061f64b7672bbe7526aefc9a12bab902ed74  obs-studio-20.1.3.tar.gz"
