diff options
author | Tom Bebbington | 2017-11-04 03:13:32 +0000 |
---|---|---|
committer | Tom Bebbington | 2017-11-04 03:16:01 +0000 |
commit | 724f826465c176437cd6bc2a1a43fca36c08612f (patch) | |
tree | ee91894e2a95438a425723d08b24c795c13e3d17 | |
parent | d07ceb384bd2d5e2adc7460290943e23181765c3 (diff) | |
download | aur-724f826465c176437cd6bc2a1a43fca36c08612f.tar.gz |
Skip stripping and automatically fetch latest version number using Github API
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | print-version.py | 7 |
3 files changed, 28 insertions, 7 deletions
@@ -1,7 +1,7 @@ pkgbase = kode-studio-bin pkgdesc = Kode Studio is an IDE specifically tailored for Kha. pkgver = 17.9.1 - pkgrel = 2 + pkgrel = 3 url = http://kha.tech/download arch = x86_64 license = MIT @@ -25,10 +25,13 @@ pkgbase = kode-studio-bin optdepends = android-studio: Android target IDE optdepends = codeblocks: Linux target IDE optdepends = eclipse-java: Java target IDE - source_x86_64 = https://github.com/Kode/KodeStudio/releases/download/v17.9.1/KodeStudio-linux64.tar.gz + options = !strip + source_x86_64 = https://github.com/Kode/KodeStudio/releases/download/v${pkgver}/KodeStudio-linux64.tar.gz source_x86_64 = kode-studio.desktop - sha256sums_x86_64 = a1ac4a5b9b74a8f5529ed616d6e4401599d1a33a4729eb1bdd7e5062a1b59cb0 + source_x86_64 = print-version.py + sha256sums_x86_64 = SKIP sha256sums_x86_64 = 085056b38a51192641b9c7daac35515491c1202374369a9b1e19cdf764273c11 + sha256sums_x86_64 = 516503d1aa701c51cc9a89c31c97f1a01f8007641b667ab326ab5ba7c3e5e46f pkgname = kode-studio-bin @@ -3,11 +3,13 @@ pkgname=kode-studio-bin _pkgname=kode-studio pkgver=17.9.1 -pkgrel=2 +pkgrel=3 pkgdesc="Kode Studio is an IDE specifically tailored for Kha." arch=('x86_64') url="http://kha.tech/download" license=('MIT') +builddepends=('curl' 'python') +options=('!strip') depends=(fontconfig libxtst gtk2 python cairo alsa-lib gconf nss gcc-libs libnotify libxss gvfs) optdepends=('haxe: third-party Haxe library support' 'g++: Linux target' @@ -17,11 +19,20 @@ optdepends=('haxe: third-party Haxe library support' 'android-studio: Android target IDE' 'codeblocks: Linux target IDE' 'eclipse-java: Java target IDE') -source_x86_64=(https://github.com/Kode/KodeStudio/releases/download/v${pkgver}/KodeStudio-linux64.tar.gz +source_x86_64=('https://github.com/Kode/KodeStudio/releases/download/v${pkgver}/KodeStudio-linux64.tar.gz' ${_pkgname}.desktop + 'print-version.py' ) -sha256sums_x86_64=('a1ac4a5b9b74a8f5529ed616d6e4401599d1a33a4729eb1bdd7e5062a1b59cb0' - '085056b38a51192641b9c7daac35515491c1202374369a9b1e19cdf764273c11') +sha256sums_x86_64=('SKIP' + '085056b38a51192641b9c7daac35515491c1202374369a9b1e19cdf764273c11' + '516503d1aa701c51cc9a89c31c97f1a01f8007641b667ab326ab5ba7c3e5e46f' + ) + +pkgver() { + cd $srcdir + curl "https://api.github.com/repos/Kode/KodeStudio/releases" -o releases.json + python print-version.py +} package() { install -d "${pkgdir}/usr/share/licenses/${_pkgname}" install -d "${pkgdir}/opt/${_pkgname}" diff --git a/print-version.py b/print-version.py new file mode 100644 index 000000000000..ee1f15f0a9c0 --- /dev/null +++ b/print-version.py @@ -0,0 +1,7 @@ +import json +from pprint import pprint + +with open('releases.json') as data_file: + data = json.load(data_file) + +print(data[0]['tag_name'].split('v')[1])
\ No newline at end of file |