update: scrcpy to 1.12-2

This commit is contained in:
Archlinux-Jerry Build Bot 2019-12-11 14:26:34 +08:00
parent 8fff8c449a
commit cd6d218b67
2 changed files with 36 additions and 39 deletions

View file

@ -1,8 +1,8 @@
# Contributor: Andrew Rabert <ar@nullsum.net> # Contributor: Andrew Rabert <ar@nullsum.net>
pkgname=scrcpy pkgname=scrcpy
pkgver=1.11 pkgver=1.12
pkgrel=1 pkgrel=2
pkgdesc='Display and control your Android device' pkgdesc='Display and control your Android device'
arch=('aarch64') arch=('aarch64')
url='https://github.com/Genymobile/scrcpy' url='https://github.com/Genymobile/scrcpy'
@ -12,29 +12,27 @@ makedepends=('meson')
optdepends=('android-tools: required if adb is not already installed') optdepends=('android-tools: required if adb is not already installed')
source=("https://github.com/Genymobile/scrcpy/archive/v${pkgver}.tar.gz" source=("https://github.com/Genymobile/scrcpy/archive/v${pkgver}.tar.gz"
"https://github.com/Genymobile/scrcpy/releases/download/v${pkgver}/scrcpy-server-v${pkgver}") "https://github.com/Genymobile/scrcpy/releases/download/v${pkgver}/scrcpy-server-v${pkgver}")
sha256sums=('86fccd2190a14c7f3024edf922229919803dee774f91c85fdee54029e179f270' sha256sums=('95aab189448582870d8e7d8a27a2c9b40838bd45ee2737be0f255f7a11647870'
'ff3a454012e91d9185cfe8ca7691cea16c43a7dcc08e92fa47ab9f0ea675abd1') 'b6595262c230e9773fdb817257abcc8c6e6e00f15b1c32b6a850ccfd8176dc10')
src_name="scrcpy-${pkgver}" prepare() {
src_server="scrcpy-server-v${pkgver}" cd "${pkgname}-${pkgver}"
rm -rf build
}
build() { build() {
cd "${src_name}" cd "${pkgname}-${pkgver}"
meson \
rm -rf build --prefix /usr \
if [[ "$CARCH" != 'aarch64' ]]; then --buildtype release \
meson build --buildtype release --strip -Db_lto=true \ --strip \
-Dprebuilt_server="../${src_server}" -Dprebuilt_server="../scrcpy-server-v${pkgver}" \
else build
meson build --buildtype release --strip \ ninja -C build
-Dprebuilt_server="../${src_server}"
fi
cd build
ninja
} }
package() { package() {
install -Dm 755 "${src_name}/build/app/scrcpy" "${pkgdir}/usr/bin/scrcpy" cd "${pkgname}-${pkgver}"
install -Dm 644 "${src_server}" "${pkgdir}/usr/local/share/scrcpy/scrcpy-server" DESTDIR="${pkgdir}" ninja -C build install
mkdir -p "${pkgdir}/usr/bin" install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
} }

View file

@ -1,20 +1,19 @@
diff --git a/PKGBUILD b/PKGBUILD
index 690e344..81978b4 100644
--- a/PKGBUILD --- a/PKGBUILD
+++ b/PKGBUILD +++ b/PKGBUILD
@@ -22,8 +22,13 @@ build() { @@ -7,7 +7,7 @@
cd "${src_name}" arch=('aarch64')
url='https://github.com/Genymobile/scrcpy'
rm -rf build license=('Apache')
- meson build --buildtype release --strip -Db_lto=true \ -depends=('android-tools' 'ffmpeg' 'sdl2')
- -Dprebuilt_server="../${src_server}" +depends=('ffmpeg' 'sdl2')
+ if [[ "$CARCH" != 'aarch64' ]]; then makedepends=('meson')
+ meson build --buildtype release --strip -Db_lto=true \ optdepends=('android-tools: required if adb is not already installed')
+ -Dprebuilt_server="../${src_server}" source=("https://github.com/Genymobile/scrcpy/archive/v${pkgver}.tar.gz"
+ else @@ -26,7 +26,6 @@
+ meson build --buildtype release --strip \ --prefix /usr \
+ -Dprebuilt_server="../${src_server}" --buildtype release \
+ fi --strip \
cd build - -Db_lto=true \
ninja -Dprebuilt_server="../scrcpy-server-v${pkgver}" \
} build
ninja -C build