summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn-Michael Mulesa2021-09-18 16:06:15 +1000
committerJohn-Michael Mulesa2021-09-18 16:06:15 +1000
commit1a5bc0de47dc5cb913515455f45538611a65b3b9 (patch)
tree25fa923947468c2a4f962ae7ce22b3b3f57f4b90
downloadaur-1a5bc0de47dc5cb913515455f45538611a65b3b9.tar.gz
Initial commit.
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD52
-rw-r--r--dirt3.desktop8
-rw-r--r--dirt3.install4
-rw-r--r--dirt3.sh9
5 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..166e0a9257d4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = dirt3-wine-steam
+ pkgdesc = DiRT 3 Complete Edition using WINE with data via Steam
+ pkgver = 1.2
+ pkgrel = 1
+ url = https://steamdb.info/app/321040/
+ install = dirt3.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = steamcmd
+ makedepends = icoutils
+ depends = wine
+ depends = winetricks
+ source = dirt3.sh
+ source = dirt3.desktop
+ source = Goldberg_Lan_Steam_Emu_master--a24a9c26.zip::https://gitlab.com/Mr_Goldberg/goldberg_emulator/-/jobs/1590301114/artifacts/download
+ sha256sums = be6a230f3b9ab47988ed51ed5adf400c404c70448a977b929769c54d4974642c
+ sha256sums = 2637145ea2d9d736330fae8207015bc6c231d58f36131898d5e622de8658f92a
+ sha256sums = 3bfe422a3daf85a02fe6458e4351a4f40f29f513ec8df2c838c7e197844e51cb
+
+pkgname = dirt3-wine-steam
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..710819e892b4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: John-Michael Mulesa <jmulesa [at] gmail.com>
+
+pkgname=dirt3-wine-steam
+_pkgname=dirt3
+pkgver=1.2
+pkgrel=1
+arch=('i686' 'x86_64')
+makedepends=('steamcmd' 'icoutils')
+depends=('wine' 'winetricks')
+source=("${_pkgname}.sh" "${_pkgname}.desktop"
+ "Goldberg_Lan_Steam_Emu_master--a24a9c26.zip::https://gitlab.com/Mr_Goldberg/goldberg_emulator/-/jobs/1590301114/artifacts/download")
+pkgdesc="DiRT 3 Complete Edition using WINE with data via Steam"
+license=('custom')
+install=dirt3.install
+url='https://steamdb.info/app/321040/'
+sha256sums=('be6a230f3b9ab47988ed51ed5adf400c404c70448a977b929769c54d4974642c'
+ '2637145ea2d9d736330fae8207015bc6c231d58f36131898d5e622de8658f92a'
+ '3bfe422a3daf85a02fe6458e4351a4f40f29f513ec8df2c838c7e197844e51cb')
+
+prepare() {
+ mkdir -p $srcdir/${_pkgname}
+
+ # Use steamcmd to get data.
+ printf "Enter your Steam username:"
+ read steam_username
+ steamcmd +@sSteamCmdForcePlatformType windows +@ShutdownOnFailedCommand 1 +force_install_dir $srcdir/${_pkgname} +login $steam_username "+app_update 321040 validate" +quit
+ wrestool -x -t -14 -o . ${_pkgname}/${_pkgname}_game.exe
+ icotool -x -o . *.ico
+}
+
+package() {
+ mkdir -p $pkgdir/opt/${_pkgname}
+
+ # Move required files to pkgdir
+ cp -r $srcdir/${_pkgname}/* $pkgdir/opt/${_pkgname}/
+ rm -rf $pkgdir/opt/${_pkgname}/steamapps
+ $srcdir/linux/tools/find_interfaces.sh $pkgdir/opt/${_pkgname}/steam_api.dll > $pkgdir/opt/${_pkgname}/steam_interfaces.txt || true
+ cp $srcdir/steam_api.dll $pkgdir/opt/${_pkgname}/
+ echo "321040" > $pkgdir/opt/${_pkgname}/steam_appid.txt
+
+ # Install desktop file.
+ install -D -m 644 $srcdir/${_pkgname}.desktop \
+ $pkgdir/usr/share/applications/${_pkgname}.desktop
+
+ # Install icon file.
+ install -D -m 644 $srcdir/dirt3_game.exe_14_101_2057_1_256x256x32.png \
+ $pkgdir/usr/share/pixmaps/${_pkgname}.png
+
+ # Install bash startup script.
+ install -D -m 755 $srcdir/${_pkgname}.sh \
+ $pkgdir/usr/bin/${_pkgname}
+}
diff --git a/dirt3.desktop b/dirt3.desktop
new file mode 100644
index 000000000000..682e984cbdcd
--- /dev/null
+++ b/dirt3.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=DiRT 3
+Comment=DiRT 3 Complete Edition WINE
+Exec=/usr/bin/dirt3
+Icon=dirt3
+Terminal=false
+Type=Application
+Categories=Application;Game;
diff --git a/dirt3.install b/dirt3.install
new file mode 100644
index 000000000000..3098525009a8
--- /dev/null
+++ b/dirt3.install
@@ -0,0 +1,4 @@
+post_install() {
+ echo "On the first run, game startup may take significantly longer while the wine prefix is prepared."
+ echo "If DiRT 3 crashes on first launch, first try setting your native display resolution in ~/Documents/My Games/DiRT3/hardwaresettings/hardware_settings_config.xml; otherwise, set '<directx forcedx9=\"true\" />' as well."
+}
diff --git a/dirt3.sh b/dirt3.sh
new file mode 100644
index 000000000000..ccd78bbae410
--- /dev/null
+++ b/dirt3.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+export WINEPREFIX="$HOME"/.dirt3/wine
+if [ ! -d "$HOME"/.dirt3 ] ; then
+ mkdir -p "$HOME"/.dirt3/wine
+ wineboot -u
+ winetricks dxvk
+fi
+cd /opt/dirt3
+/usr/bin/wine dirt3_game.exe