# Contributor: Andrew Rabert pkgname=scrcpy pkgver=1.11 pkgrel=1 pkgdesc='Display and control your Android device' arch=('aarch64') url='https://github.com/Genymobile/scrcpy' license=('Apache') depends=('ffmpeg' 'sdl2') makedepends=('meson') optdepends=('android-tools: required if adb is not already installed') source=("https://github.com/Genymobile/scrcpy/archive/v${pkgver}.tar.gz" "https://github.com/Genymobile/scrcpy/releases/download/v${pkgver}/scrcpy-server-v${pkgver}") sha256sums=('86fccd2190a14c7f3024edf922229919803dee774f91c85fdee54029e179f270' 'ff3a454012e91d9185cfe8ca7691cea16c43a7dcc08e92fa47ab9f0ea675abd1') src_name="scrcpy-${pkgver}" src_server="scrcpy-server-v${pkgver}" build() { cd "${src_name}" rm -rf build if [[ "$CARCH" != 'aarch64' ]]; then meson build --buildtype release --strip -Db_lto=true \ -Dprebuilt_server="../${src_server}" else meson build --buildtype release --strip \ -Dprebuilt_server="../${src_server}" fi cd build ninja } package() { install -Dm 755 "${src_name}/build/app/scrcpy" "${pkgdir}/usr/bin/scrcpy" install -Dm 644 "${src_server}" "${pkgdir}/usr/local/share/scrcpy/scrcpy-server" mkdir -p "${pkgdir}/usr/bin" }