diff options
-rw-r--r-- | d2launcher/PKGBUILD | 29 | ||||
-rw-r--r-- | d2launcher/d2launcher.desktop | 6 | ||||
-rw-r--r-- | d2launcher/d2launcher.patch | 40 |
3 files changed, 75 insertions, 0 deletions
diff --git a/d2launcher/PKGBUILD b/d2launcher/PKGBUILD new file mode 100644 index 0000000..af4b189 --- /dev/null +++ b/d2launcher/PKGBUILD @@ -0,0 +1,29 @@ +pkgname=d2launcher +pkgver=3.6.4 +pkgrel=3 +pkgdesc="Launcher for Diablo 2, Median XL and D2 Stats" +arch=('x86_64') +url="https://github.com/murkl/d2launcher" +license=('unknown') +depends=(wine zenity curl p7zip jq wmctrl fuse2 zip xdelta3) +optdepends=('lutris-wine-meta: Install in case of graphic issues') +source=("d2launcher.desktop" + "d2launcher.patch" + "${pkgname}-${pkgver}.tar.gz::https://github.com/murkl/d2launcher/archive/refs/tags/${pkgver}.tar.gz") +sha256sums=('SKIP' + 'SKIP' + '2aa225ee00d653bb13f4a84caf48d7cfc172f7555613c2f7c063fdaa784e2c5d') + +prepare() { + patch --directory="${srcdir}/${pkgname}-${pkgver}" --strip=1 --input="${srcdir}/d2launcher.patch" +} + +package() { + mkdir -p "${pkgdir}/opt/d2launcher" + mkdir -p "${pkgdir}/usr/bin" + mkdir -p "${pkgdir}/usr/share/applications" + cp -r "${srcdir}/${pkgname}-${pkgver}/"* "$pkgdir/opt/d2launcher/" + cp d2launcher.desktop "${pkgdir}/usr/share/applications/" + chmod +x "${pkgdir}/opt/d2launcher/d2launcher" + ln -s /opt/d2launcher/d2launcher "${pkgdir}/usr/bin/" +} diff --git a/d2launcher/d2launcher.desktop b/d2launcher/d2launcher.desktop new file mode 100644 index 0000000..2967439 --- /dev/null +++ b/d2launcher/d2launcher.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Diablo II +Icon=/opt/d2launcher/res/icon.svg +Exec=d2launcher +Type=Application +Categories=Game diff --git a/d2launcher/d2launcher.patch b/d2launcher/d2launcher.patch new file mode 100644 index 0000000..b20672f --- /dev/null +++ b/d2launcher/d2launcher.patch @@ -0,0 +1,40 @@ +From 8cb8a315398edd0121e4cf4f9820c5a1e777285a Mon Sep 17 00:00:00 2001 +From: Starfall <us@starfall.systems> +Date: Mon, 8 Jan 2024 08:03:57 -0600 +Subject: [PATCH] patch to use Zaharel's d2stats fork + +--- + d2launcher | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/d2launcher b/d2launcher +index 01dabb1..28091dc 100755 +--- a/d2launcher ++++ b/d2launcher +@@ -77,7 +77,7 @@ MXL_PATCH_VERSION="d2launcher-patch.version" + + # Urls + wine_native_url="https://github.com/Kron4ek/Wine-Builds/releases/download/7.0-5-proton/wine-7.0-5-proton-amd64.tar.xz" +-d2_stats_url="https://github.com/Kyromyr/D2Stats/releases/download/3.11.5/D2Stats-3.11.5.rar" ++d2_stats_url="https://github.com/Zahariel1942/D2Stats/releases/download/3.12.2/D2Stats_3.12.2.zip" + d2_sigma_loader_url="https://github.com/SyndromeDayna/diablo-2-median-xl-sigma-loader/releases/download/3/sigma-loader.exe" + + # Wine +@@ -669,10 +669,10 @@ check_d2stats_install() { + rm -f -r "$D2_STATS_BIN_DIR" + mkdir -p "$D2_STATS_BIN_DIR" + cd "$D2_STATS_BIN_DIR" || exit 1 +- local rar_file=d2-stats.rar +- curl -Lk "$d2_stats_url" -o "$rar_file" +- unrar x "$rar_file" +- rm "$rar_file" ++ local zip_file=d2-stats.zip ++ curl -Lk "$d2_stats_url" -o "$zip_file" ++ 7z x "$zip_file" ++ rm "$zip_file" + ) & + if ! zenity_progress $! "Downloading D2Stats"; then + rm -f -r "$D2_STATS_BIN_DIR" +-- +2.43.0 + |