diff options
author | Your Name | 2023-07-24 13:03:13 +0800 |
---|---|---|
committer | Your Name | 2023-07-24 13:03:13 +0800 |
commit | f5635722ea1098ba436490cc1e1eee45f4208d23 (patch) | |
tree | fe6824431f2d545bb8923f0da1320b5cda8db609 | |
download | aur-scrcpy-full-git.tar.gz |
update
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 50 |
2 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a93e2ef4185e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = scrcpy-full-git + pkgdesc = Display and control your Android device + pkgver = v2.1.1.r5.gfcdf847 + pkgrel = 1 + url = https://github.com/Genymobile/scrcpy + arch = x86_64 + license = Apache + makedepends = meson + makedepends = android-platform + makedepends = android-sdk-build-tools + depends = android-tools + depends = ffmpeg + depends = sdl2 + provides = scrcpy + conflicts = scrcpy + source = git+https://github.com/Genymobile/scrcpy.git + b2sums = SKIP + +pkgname = scrcpy-full-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7e93d06944ad --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org> +# Contributor: Andrew Rabert <ar@nullsum.net> + +pkgname=scrcpy-full-git +pkgver=v2.1.1.r5.gfcdf847 +pkgrel=1 +pkgdesc='Display and control your Android device' +arch=(x86_64) +url='https://github.com/Genymobile/scrcpy' +license=(Apache) +depends=(android-tools ffmpeg sdl2) +provides=(scrcpy) +conflicts=(scrcpy) +makedepends=(meson android-platform android-sdk-build-tools) +source=("git+$url.git") +b2sums=('SKIP') + +pkgver() { + cd scrcpy + git describe --long --abbrev=7 | sed 's/^foo-//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd $srcdir/scrcpy/server + + export ANDROID_PLATFORM=$(ls /opt/android-sdk/platforms | head -n 1 | sed "s/android-//g") + export ANDROID_BUILD_TOOLS=$(ls /opt/android-sdk/build-tools | head -n 1) + export ANDROID_HOME=/opt/android-sdk + + sed -i "s/^SCRCPY_VERSION_NAME=.*$/SCRCPY_VERSION_NAME=$pkgver/" build_without_gradle.sh + + sh build_without_gradle.sh + + cd $srcdir/scrcpy + + sed -i "s/^\(\s\+\)version: .*$/version: '$pkgver',/" meson.build + mkdir -p build + arch-meson build . \ + -D b_lto=true \ + -D b_ndebug=true \ + -D prebuilt_server=./server/build_manual/scrcpy-server \ + --buildtype release + ninja -C build +} + +package() { + cd $srcdir/scrcpy + DESTDIR="$pkgdir" ninja -C build install + install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" +} |