summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoraligator2019-07-21 14:54:42 +0200
committeraligator2019-07-21 14:54:42 +0200
commitf7a1cd06b6ad0dbe6200d7371162586d49e1a3bf (patch)
treed481e6f624024fb32f62a89589e40e8ae606e66f
parent746e59774dfa119ea332ed8f97c90d0ea5b29105 (diff)
downloadaur-f7a1cd06b6ad0dbe6200d7371162586d49e1a3bf.tar.gz
use gradlew with downloded zip as gradle 5 is incompatible, refactorings
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD24
3 files changed, 23 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4a9c04b2a72..e0bfeedca6d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,22 @@
pkgbase = jsettlers-git
pkgdesc = A Remake of "The Settlers III" for Windows, Linux, Mac and Android
- pkgver = 0.4.0.alpha.r188.g69db7d0f8
- pkgrel = 2
+ pkgver = 0.4.0.alpha.r693.g5576c872d
+ pkgrel = 1
url = https://github.com/jsettlers/settlers-remake
install = jsettlers-git.install
arch = any
license = MIT
makedepends = jdk8-openjdk
makedepends = unzip
- makedepends = gradle
depends = java-environment
depends = sh
optdepends = settlers3-demo-data
provides = jsettlers
+ noextract = gradle-4.6-all.zip
source = jsettlers::git+https://github.com/jsettlers/settlers-remake.git
+ source = https://services.gradle.org/distributions/gradle-4.6-all.zip
sha512sums = SKIP
+ sha512sums = 36249d86e5e35d793448960251c9db1be36643ea4846be35e7b9af5c0bed245dac20c4682580c53ff80f6745369cb5dad8dd840a9b00f7b67d1ec563a9e6e106
pkgname = jsettlers-git
diff --git a/.gitignore b/.gitignore
index 9015d4b223e..9ed1da9adfa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ pkg/
src/
jsettlers/
jsettlers-git-*.pkg.tar.xz
+gradle-*.zip \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index f9e605ee730..e6264555784 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,41 @@
# Maintainer: aligator <aligator at-symbol suncraft-server dot de>
-pkgrel=2
+pkgrel=1
_pkgname='jsettlers'
pkgname=${_pkgname}'-git'
-pkgver=0.4.0.alpha.r613.gb51b35a5c
+pkgver=0.4.0.alpha.r693.g5576c872d
pkgver() {
cd ${_pkgname}
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
+_gradlever='4.6'
arch=('any')
pkgdesc='A Remake of "The Settlers III" for Windows, Linux, Mac and Android'
url='https://github.com/jsettlers/settlers-remake'
license=('MIT')
provides=(${_pkgname})
-depends=('java-environment' 'sh')
+depends=('java-runtime=8' 'sh')
optdepends=('settlers3-demo-data')
-makedepends=('jdk8-openjdk' 'unzip' 'gradle')
+makedepends=('java-environment=8' 'unzip')
install=${pkgname}'.install'
-source=('jsettlers::git+https://github.com/jsettlers/settlers-remake.git')
-sha512sums=('SKIP')
+source=("jsettlers::git+https://github.com/jsettlers/settlers-remake.git"
+ "https://services.gradle.org/distributions/gradle-${_gradlever}-all.zip")
+noextract=("gradle-${_gradlever}-all.zip")
+sha512sums=('SKIP'
+ '36249d86e5e35d793448960251c9db1be36643ea4846be35e7b9af5c0bed245dac20c4682580c53ff80f6745369cb5dad8dd840a9b00f7b67d1ec563a9e6e106')
+
+prepare() {
+ # prepare gradle to use downloaded zip
+ sed -i "/distributionUrl=/c\distributionUrl=gradle-${_gradlever}-all.zip" ${srcdir}/${_pkgname}/gradle/wrapper/gradle-wrapper.properties
+ mv gradle-${_gradlever}-all.zip ${srcdir}/${_pkgname}/gradle/wrapper
+}
build() {
cd ${srcdir}/${_pkgname}
# build game (without android)
- JAVA_HOME="/usr/lib/jvm/java-8-openjdk" ANDROID_HOME="" gradle --gradle-user-home=. releaseJSettlers || return 1
+ JAVA_HOME="/usr/lib/jvm/java-8-openjdk" ANDROID_HOME="" ./gradlew --gradle-user-home=. releaseJSettlers || return 1
}
package() {