From 2a07fa35255716943c11e6bba29d86ea2e9ffd35 Mon Sep 17 00:00:00 2001 From: Thyrum Date: Tue, 12 Jul 2022 09:17:34 +0200 Subject: [PATCH] Get `Unciv.desktop` and `Unciv.sh` from release Previously the `Unciv.desktop` and `Unciv.sh` files were fixed in this repository. They are now downloaded directly from the GitHub release so they are always up-to-date. Furthermore, changed the name of the icon to `unciv.png` instead of `Unciv.png`, hopefully making gnome desktops able to find it and link it to the correct desktop application. --- .SRCINFO | 8 +++----- PKGBUILD | 16 +++++++--------- Unciv.desktop | 12 ------------ Unciv.sh | 46 ---------------------------------------------- 4 files changed, 10 insertions(+), 72 deletions(-) delete mode 100644 Unciv.desktop delete mode 100644 Unciv.sh diff --git a/.SRCINFO b/.SRCINFO index 29b69b6938226..504874ef77c9c 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = unciv-bin pkgdesc = Open-source remake of Civilization V pkgver = 4.1.18 - pkgrel = 0 + pkgrel = 1 url = https://github.com/yairm210/Unciv arch = any license = MPL-2.0 @@ -13,11 +13,9 @@ pkgbase = unciv-bin noextract = Unciv-4.1.18.jar source = Unciv-4.1.18.jar::https://github.com/yairm210/Unciv/releases/download/4.1.18/Unciv.jar source = Unciv-4.1.18.png::https://raw.githubusercontent.com/yairm210/Unciv/4.1.18/extraImages/Unciv%20icon%20v4.png - source = Unciv.sh - source = Unciv.desktop + source = Unciv-4.1.18.zip::https://github.com/yairm210/Unciv/releases/download/4.1.18/linuxFilesForJar.zip md5sums = 0ccfebe5bc664fe29580cf798d9bd858 md5sums = 5aca7fc33f121fcf901fef14f784731a - md5sums = b5c3190a1616e545df32536920e07c98 - md5sums = 42d5f7ea8ee48d2d643d070786f039ba + md5sums = 7f15dcf71e93af89b08fe8984a6bd6ca pkgname = unciv-bin diff --git a/PKGBUILD b/PKGBUILD index 7575645ed9da1..bfdedcc566091 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,7 +4,7 @@ pkgname=unciv-bin _pkgname=Unciv _pkgver=4.1.18 pkgver=${_pkgver//-/_} -pkgrel=0 +pkgrel=1 pkgdesc="Open-source remake of Civilization V" url="https://github.com/yairm210/Unciv" license=('MPL-2.0') @@ -13,22 +13,20 @@ provides=('unciv') conflicts=('unciv') arch=('any') source=( - "$_pkgname-$_pkgver.jar::https://github.com/yairm210/Unciv/releases/download/$_pkgver/Unciv.jar" + "$_pkgname-$_pkgver.jar::https://github.com/yairm210/$_pkgname/releases/download/$_pkgver/Unciv.jar" "$_pkgname-$_pkgver.png::https://raw.githubusercontent.com/yairm210/$_pkgname/$_pkgver/extraImages/Unciv%20icon%20v4.png" - "$_pkgname.sh" - "$_pkgname.desktop" + "$_pkgname-$_pkgver.zip::https://github.com/yairm210/$_pkgname/releases/download/$_pkgver/linuxFilesForJar.zip" ) noextract=( "$_pkgname-$_pkgver.jar" ) md5sums=('0ccfebe5bc664fe29580cf798d9bd858' '5aca7fc33f121fcf901fef14f784731a' - 'b5c3190a1616e545df32536920e07c98' - '42d5f7ea8ee48d2d643d070786f039ba') + '7f15dcf71e93af89b08fe8984a6bd6ca') package() { - install -Dm755 $_pkgname.sh "$pkgdir/usr/bin/$_pkgname" - install -Dm644 $_pkgname.desktop "$pkgdir/usr/share/applications/$_pkgname.desktop" - install -Dm644 $_pkgname-$_pkgver.png "$pkgdir/usr/share/pixmaps/$_pkgname.png" + install -Dm755 Unciv.sh "$pkgdir/usr/bin/$_pkgname" + install -Dm644 unciv.desktop "$pkgdir/usr/share/applications/unciv.desktop" + install -Dm644 $_pkgname-$_pkgver.png "$pkgdir/usr/share/pixmaps/unciv.png" install -Dm644 $_pkgname-$_pkgver.jar "$pkgdir/usr/share/$_pkgname/$_pkgname.jar" } diff --git a/Unciv.desktop b/Unciv.desktop deleted file mode 100644 index 77bf6570a3a39..0000000000000 --- a/Unciv.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[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 deleted file mode 100644 index 7e2d95ca5efeb..0000000000000 --- a/Unciv.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -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