commit 152cbd272fb40a1c4487395b1c2a3e5cef3703ac Author: Adel Khial Date: Mon Mar 29 09:58:05 2021 +0100 Initial commit diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000000000..59e93eb7a2a43 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = unciv-bin + pkgdesc = Open-source remake of Civilization V + pkgver = 3.13.11.1 + pkgrel = 1 + url = https://github.com/yairm210/Unciv + arch = any + license = MPL-2.0 + depends = jre8-openjdk + depends = bash + depends = xorg-xrandr + source = https://github.com/yairm210/Unciv/releases/download/3.13.11-patch1/Unciv.jar + source = Unciv.sh + source = Unciv.desktop + source = https://github.com/yairm210/Unciv/tree/3.13.11-patch1/extraImages/Unciv icon v4.png + md5sums = e4efe45883990484be415035cc0dcd24 + md5sums = f8eab098f20681b8db232cc5709713d3 + md5sums = 42d5f7ea8ee48d2d643d070786f039ba + md5sums = 5aca7fc33f121fcf901fef14f784731a + +pkgname = unciv-bin + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000..ec657a75f444a --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.jar +*.tar.xz +*.zip +src +pkg diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000000000..d7a9a1689d399 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Adel Khial + +pkgname=unciv-bin +_pkgname=Unciv +pkgver=3.13.11.1 +pkgrel=1 +pkgdesc="Open-source remake of Civilization V" +url="https://github.com/yairm210/Unciv" +license=('MPL-2.0') +depends=('jre8-openjdk' 'bash' 'xorg-xrandr') +arch=('any') +source=( + "https://github.com/yairm210/Unciv/releases/download/3.13.11-patch1/Unciv.jar" + "$_pkgname.sh" + "$_pkgname.desktop" + "https://github.com/yairm210/Unciv/tree/3.13.11-patch1/extraImages/Unciv icon v4.png" +) +md5sums=('e4efe45883990484be415035cc0dcd24' + 'f8eab098f20681b8db232cc5709713d3' + '42d5f7ea8ee48d2d643d070786f039ba' + '5aca7fc33f121fcf901fef14f784731a') + +package() { + install -Dm755 $_pkgname.sh "$pkgdir/usr/bin/$_pkgname" + install -Dm644 $_pkgname.desktop "$pkgdir/usr/share/applications/$_pkgname.desktop" + install -Dm644 "Unciv icon v4.png" "$pkgdir/usr/share/pixmaps/unciv.png" + install -Dm644 $_pkgname.jar "$pkgdir/usr/share/$_pkgname/$_pkgname.jar" +} + diff --git a/Unciv.desktop b/Unciv.desktop new file mode 100644 index 0000000000000..77bf6570a3a39 --- /dev/null +++ b/Unciv.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Comment=Open-source Android/Desktop remake of Civ V +Exec=Unciv +GenericName=4X Game +Icon=unciv +Name=Unciv +NoDisplay=false +StartupNotify=true +Terminal=0 +Type=Application +Categories=Game diff --git a/Unciv.sh b/Unciv.sh new file mode 100644 index 0000000000000..22e51b2b99bb0 --- /dev/null +++ b/Unciv.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH +CONFIG_DIR="$HOME/.local/share/Unciv" + +USAGE="Unciv [--help | -h | --config-dir PATH] + +Run the Unciv game. + +With '--help' or '-h', show this help info and exit. + +With '--config-dir PATH', use/make configuration files in PATH instead +of the default of '$CONFIG_DIR'. + +" + +usage() { + echo "$USAGE" + exit 0 +} + +fail() { + echo "Error: $1" + usage + exit 1 +} + +if [ "$#" -gt "0" ]; then + case "$1" in + --help|-h) + shift + usage + ;; + --config-dir) + CONFIG_DIR="$2" + shift 2 + ;; + esac + shift +fi +if ! [ "$#" -eq "0" ]; then + fail "Unknown argument(s): $*" +fi + +mkdir -p "$CONFIG_DIR" +cd "$CONFIG_DIR" || fail "Could not 'cd' to '$CONFIG_DIR'" +java -jar /usr/share/Unciv/Unciv.jar