# Template file for 'scrcpy'
pkgname=scrcpy
version=2.1
revision=1
build_style=meson
configure_args="-Dcompile_server=false
 -Dprebuilt_server=/usr/share/scrcpy/scrcpy-server-v${version}"
hostmakedepends="pkg-config"
makedepends="SDL2-devel ffmpeg-devel"
depends="android-tools"
short_desc="Display and control your Android device"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="Apache-2.0"
homepage="https://github.com/Genymobile/scrcpy"
distfiles="https://github.com/Genymobile/scrcpy/archive/v${version}.tar.gz
 https://github.com/Genymobile/scrcpy/releases/download/v${version}/scrcpy-server-v${version}"
checksum="57a277238d19d3471f37003d0d567bb8cde0a2b487b5cf91416129b463d9e8d5
 5b8bf1940264b930c71a1c614c57da2247f52b2d4240bca865cc6d366dff6688"
skip_extraction="scrcpy-server-v${version}"

post_install() {
	vinstall ${XBPS_SRCDISTDIR}/scrcpy-${version}/scrcpy-server-v${version} \
		644 /usr/share/scrcpy/ scrcpy-server
}
