summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoraligator2018-04-15 13:44:12 +0200
committeraligator2018-04-15 13:44:12 +0200
commit917832e21fa92c17b6b56c026c1c0e8d3a332d44 (patch)
tree46bfc7c5d4772a2526976ce36ca1551360004c1d
downloadaur-917832e21fa92c17b6b56c026c1c0e8d3a332d44.tar.gz
init package
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD67
-rw-r--r--jsettlers-git.install14
4 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..dec8dea023b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = jsettlers-git
+ pkgdesc = A Remake of "The Settlers III" for Windows, Linux, Mac and Android
+ pkgver = 0.4.0.alpha.r188.g69db7d0f8
+ pkgrel = 1
+ url = https://github.com/jsettlers/settlers-remake
+ install = jsettlers-git.install
+ arch = any
+ license = MIT
+ makedepends = jdk8-openjdk
+ makedepends = unzip
+ depends = java-environment
+ depends = sh
+ optdepends = settlers3-data
+ provides = jsettlers
+ source = jsettlers::git+https://github.com/jsettlers/settlers-remake.git
+ sha512sums = SKIP
+
+pkgname = jsettlers-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..9015d4b223e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+jsettlers/
+jsettlers-git-*.pkg.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..730b8ac2dd3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,67 @@
+# Maintainer: aligator <aligator at-symbol server-suncraft dot de>
+pkgrel=1
+_pkgname='jsettlers'
+pkgname=${_pkgname}'-git'
+
+pkgver=0.4.0.alpha.r188.g69db7d0f8
+pkgver() {
+ cd ${_pkgname}
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+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')
+optdepends=('settlers3-data')
+makedepends=('jdk8-openjdk' 'unzip')
+install=${pkgname}'.install'
+source=('jsettlers::git+https://github.com/jsettlers/settlers-remake.git')
+sha512sums=('SKIP')
+
+build() {
+ cd ${srcdir}/${_pkgname}
+
+ # build game (without android)
+ JAVA_HOME="/usr/lib/jvm/java-8-openjdk" ANDROID_HOME="" ./gradlew releaseJSettlers || return 1
+}
+
+package() {
+ _jarDest=${pkgdir}/usr/share/java/${_pkgname}
+ _dataDest=${pkgdir}/usr/share/${_pkgname}
+ _licenseDest=${pkgdir}/usr/share/licenses/${pkgname}
+ bin=${pkgdir}/usr/bin
+
+ _progName='JSettlers'
+
+ _workingDir='~/.'${_pkgname}
+ _mapCreatorName='MapCreator'
+ _mapCreatorScript=${_pkgname}'-'${_mapCreatorName,,}
+
+ # create destination-dirs
+ mkdir -p ${_jarDest} ${_dataDest} ${_licenseDest}
+
+ # copy game-files
+ cd ${srcdir}/${_pkgname}/release
+ unzip -j ${_progName}'.zip' ${_progName}'/'${_progName}'.jar' -d ${_jarDest}
+ unzip -j ${_progName}'.zip' ${_progName}'/'${_mapCreatorName}'.jar' -d ${_jarDest}
+ unzip -j ${_progName}'.zip' ${_progName}'/maps/*' -d ${_dataDest}'/maps'
+
+ # copy license
+ cd ${srcdir}
+ cp ${_pkgname}'/LICENSE.txt' ${_licenseDest}
+
+ # create launch-scripts
+ mkdir -p ${bin}
+ echo '#!/bin/sh' > ${bin}/${_pkgname}
+ echo 'cd '${_workingDir} >> ${bin}/${_pkgname}
+ echo 'exec /usr/bin/java -jar /usr/share/java/'${_pkgname}'/'${_progName}'.jar --maps=/usr/share/'${_pkgname}'/maps "$@"' >> ${bin}/${_pkgname}
+ chmod +x ${bin}/${_pkgname}
+
+ echo '#!/bin/sh' > ${bin}/${_mapCreatorScript}
+ echo 'cd '${_workingDir} >> ${bin}/${_mapCreatorScript}
+ echo 'exec /usr/bin/java -jar /usr/share/java/'${_pkgname}'/'${_mapCreatorName}'.jar --maps=/usr/share/'${_pkgname}'/maps "$@"' >> ${bin}/${_mapCreatorScript}
+ chmod +x ${bin}/${_mapCreatorScript}
+} \ No newline at end of file
diff --git a/jsettlers-git.install b/jsettlers-git.install
new file mode 100644
index 00000000000..869fee950ce
--- /dev/null
+++ b/jsettlers-git.install
@@ -0,0 +1,14 @@
+function info() {
+ echo "The game will ask you for the original game data:"
+ echo "If you own \"The Settlers 3\", you can select the installation folder from it."
+ echo "(Install with wine)"
+ echo "If you don't own \"The Settlers 3\" use the demo"
+}
+
+post_install() {
+ info
+}
+
+post_upgrade() {
+ info
+} \ No newline at end of file