Initial commit

This commit is contained in:
Adel Khial 2021-03-29 09:58:05 +01:00
commit 152cbd272f
5 changed files with 114 additions and 0 deletions

21
.SRCINFO Normal file
View file

@ -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

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
*.jar
*.tar.xz
*.zip
src
pkg

29
PKGBUILD Normal file
View file

@ -0,0 +1,29 @@
# Maintainer: Adel Khial <adel.khial@gmail.com>
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"
}

12
Unciv.desktop Normal file
View file

@ -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

47
Unciv.sh Normal file
View file

@ -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