APP=scrcpy
VERSION=1.16
BUILD=1sml
HOMEPAGE="https://github.com/Genymobile/scrcpy"
DOWNLOAD="https://github.com/Genymobile/scrcpy/archive/refs/tags/v1.16.tar.gz"
DESC="Lightweight display and control utility to interact with Android 5.1+ devices over USB or TCP/IP"
REQUIRES="meson sdl2 ffmpeg"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  mkdir -p build/server && cd build
  cp $SRCDIR/scrcpy-server-v"$VERSION".zip server/scrcpy-server
  meson .. \
    --prefix="/" \
    --buildtype release 

  ninja
  DESTDIR="$PKG" ninja install

  cp ../LICENSE $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
e50903e3be3f822e2bf8c873b636aef87e83122d65f48159345dab36cc352f56b019aa528181458f2b1a3043938ce96e0a35ba51c12a5e2bec8bdaedfb20914c  scrcpy-1.16.tar.gz
52d4fbf48a91e61abff5e0bbc510c83fb4c1238a2791f888baf9fb04f04c5c19dfc82525c717fc1b92bd86fb2152cb29f6932784e1e2115329288ec97d8594fc  scrcpy-server-v1.16.zip
"
