From 555e8e16049802ff0af8aeb434485b803e9a5fda Mon Sep 17 00:00:00 2001 From: Archlinux-Jerry Build Bot Date: Sat, 5 Oct 2019 11:37:01 +0800 Subject: [PATCH] add package: scrcpy, aarch64 --- scrcpy/PKGBUILD | 40 ++++++++++++++++++++++++++++++++++++++++ scrcpy/autobuild.yaml | 2 ++ 2 files changed, 42 insertions(+) create mode 100644 scrcpy/PKGBUILD create mode 100644 scrcpy/autobuild.yaml diff --git a/scrcpy/PKGBUILD b/scrcpy/PKGBUILD new file mode 100644 index 0000000..81978b4 --- /dev/null +++ b/scrcpy/PKGBUILD @@ -0,0 +1,40 @@ +# Contributor: Andrew Rabert + +pkgname=scrcpy +pkgver=1.10 +pkgrel=2 +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}.jar") +sha256sums=('71bd3b01f26233d73b91c0953ce004bd3195bcfd0c83b76c269094fb06e5ffa5' + 'cbeb1a4e046f1392c1dc73c3ccffd7f86dec4636b505556ea20929687a119390') + +src_name="scrcpy-${pkgver}" +src_server="scrcpy-server-v${pkgver}.jar" + +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.jar" + mkdir -p "${pkgdir}/usr/bin" +} diff --git a/scrcpy/autobuild.yaml b/scrcpy/autobuild.yaml new file mode 100644 index 0000000..ad25ff3 --- /dev/null +++ b/scrcpy/autobuild.yaml @@ -0,0 +1,2 @@ +type: + auto