Skip to content

Instantly share code, notes, and snippets.

@BillFleming
Last active November 7, 2020 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BillFleming/52577fae34577ff6a0e8094b47988fcc to your computer and use it in GitHub Desktop.
Save BillFleming/52577fae34577ff6a0e8094b47988fcc to your computer and use it in GitHub Desktop.
UT99 ImprovedMakePKG
#!/bin/bash
cd "/opt/gog/gog-unreal-tournament-goty/System" && ./ut-bin
# Maintainer: Zacharias Knudsen <zachasme@gmail.com>
pkgname=gog-unreal-tournament-goty
pkgver=2.0.0.5
pkgrel=4
pkgdesc="Unreal Tournament (99): Game of the Year Edition. GOG Version."
arch=('x86_64')
url="https://www.gog.com/game/unreal_tournament_goty"
license=('custom')
depends=('lib32-sdl'
'lib32-libgl')
makedepends=('innoextract')
source=("setup_ut_goty_$pkgver.exe::gogdownloader://unreal_tournament_goty/en1installer0"
"https://github.com/OldUnreal/UnrealTournamentPatches/releases/download/v469a/OldUnreal-UTPatch469a-Linux.tar.bz2"
"gog-unreal-tournament-goty"
"launch.sh"
"UT99.desktop")
noextract=("ut99v451-linux..tar.gz")
sha256sums=("4cc257d54d97659c5062f2bf186d0a8c6959561d11e42d8fcf2eac07f1926803"
"d521a8339b80a4c86019c3648fb55cfc29edffeec73047ceb72784b159cc84f1"
"2b70aa7a20d5b1fbfaf9561bd3cfc8c1d0f0dee2212b3914aed30a7c75e40566"
"0d22d3676808a7c9ca133d329571e735ed9944828ca2f8ac2c397b1bd1da87a5"
"1bc457392bafeae8a8f59795fd5a201087c75f855853dc6061e3a11a32a494b5")
DLAGENTS+=("gogdownloader::/usr/bin/echo %u Download the GOG file to \"$PWD\" or set up a gogdownloader:// DLAGENT.")
prepare() {
# extract gog installer
innoextract -em -d $srcdir setup_ut_goty_${pkgver}.exe
# extract extra linux files
tar -xf OldUnreal-UTPatch469a-Linux.tar.bz2 -C app
# copy launcher and desktop file
cp launch.sh app
cp UT99.desktop app
# To put extra content (extra levels/mods) into the game create an addons folder next to the PKGBUILD.
# Whatever is in there will get copied to the root of the game's directory.
# If nothing found we will ignore the error
cp -r addons/* app 2>/dev/null || :
}
package() {
# make destination directory
mkdir -p $pkgdir/opt/gog/$pkgname
# copy game files
cp -r app/* $pkgdir/opt/gog/$pkgname
# fix permissions
chmod 777 -R $pkgdir/opt/gog/$pkgname
# copy runner to /usr/bin
install -D -m 755 $pkgname $pkgdir/usr/bin/$pkgname
# copy desktop file to /usr/share/applications
mkdir -p $pkgdir/usr/share/applications
cp app/UT99.desktop $pkgname $pkgdir/usr/share/applications
}
[Desktop Entry]
Name=UT99
Exec=/opt/gog/gog-unreal-tournament-goty/launch.sh
Comment=UT99
Terminal=false
Icon=/opt/gog/gog-unreal-tournament-goty/System/Unreal.ico
Type=Application
Categories=Game;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment