diff options
author | Addison Snelling | 2018-10-14 03:13:42 -0500 |
---|---|---|
committer | Addison Snelling | 2018-10-14 03:13:42 -0500 |
commit | fa8c4f012db6bc80a4b5ab7bdc691c5727f035bd (patch) | |
tree | 685045d9313d608cdf58b2549b626322fbcafe2b | |
download | aur-fa8c4f012db6bc80a4b5ab7bdc691c5727f035bd.tar.gz |
convert scrcpy to VCS package
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 41 |
2 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f29288e85782 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = scrcpy-git + pkgdesc = Display and control your Android device (development version) + pkgver = 1.4.r4.gb882322 + pkgrel = 1 + url = https://github.com/Genymobile/scrcpy + arch = i686 + arch = x86_64 + license = Apache + makedepends = gcc + makedepends = meson + makedepends = git + depends = ffmpeg + depends = sdl2 + optdepends = android-tools: required if adb is not already installed + provides = scrcpy + conflicts = scrcpy + source = git+https://github.com/Genymobile/scrcpy.git + source = https://github.com/Genymobile/scrcpy/releases/download/v1.4/scrcpy-server-v1.4.jar + sha256sums = SKIP + sha256sums = 1ff7a72fcfe81dadccfab9d6f86c971cd7c7f38f17196748fe05480e301b443d + +pkgname = scrcpy-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7f3c97f5cd68 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Addison Snelling <addison@asnell.io> + +pkgname=scrcpy-git +pkgver=1.4.r4.gb882322 +pkgrel=1 +pkgdesc='Display and control your Android device (development version)' +arch=('i686' 'x86_64') +url='https://github.com/Genymobile/scrcpy' +license=('Apache') +depends=('ffmpeg' 'sdl2') +makedepends=('gcc' 'meson' 'git') +optdepends=('android-tools: required if adb is not already installed') +source=("git+https://github.com/Genymobile/scrcpy.git" + "https://github.com/Genymobile/scrcpy/releases/download/v${pkgver%.r*}/scrcpy-server-v${pkgver%.r*}.jar") +sha256sums=('SKIP' + '1ff7a72fcfe81dadccfab9d6f86c971cd7c7f38f17196748fe05480e301b443d') +provides=("scrcpy") +conflicts=("scrcpy") + +pkgver() { + cd "${srcdir}/${pkgname%-git}" + git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${srcdir}/${pkgname%-git}" + + rm -rf "$srcdir/build" + meson \ + --prefix /usr \ + --buildtype release \ + --strip \ + -Db_lto=true \ + -Dprebuilt_server="${srcdir}/scrcpy-server-v${pkgver%.r*}.jar" \ + "$srcdir/build" + ninja -C "$srcdir/build" +} + +package() { + DESTDIR="$pkgdir/" ninja -C "$srcdir/build" install +} |