summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorholybaechu2024-03-17 15:23:41 +0900
committerholybaechu2024-03-17 15:23:41 +0900
commit2fe590d90e403d7b6c7ac44f01d6245014a65245 (patch)
tree2c2fc82685baa5d14e043d78de28747e9968be49
parent4174ce8d43af7763cc676bf4e4e938ea0c916c87 (diff)
downloadaur-2fe590d90e403d7b6c7ac44f01d6245014a65245.tar.gz
Use endpoint for specific version of the Launcher
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD58
-rwxr-xr-xcleanup.sh4
3 files changed, 33 insertions, 49 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 77b00ed3a60b..911637563dcc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,12 @@
pkgbase = labymod-appimage
- pkgdesc = LabyMod Launcher for launching LabyMod, which is a Minecraft client that adds bunch of useful features
- pkgver = 2.0.12
- pkgrel = 5
- url = https://www.labymod.net
- arch = x86_64
- license = unknown
- depends = fuse
- depends = xorg-xrandr
- options = !strip
- source = https://releases.r2.labymod.net/launcher/linux/x64/LabyMod%20Launcher-latest.AppImage
- sha256sums = SKIP
+pkgdesc = LabyMod Launcher for launching LabyMod, which is a Minecraft client that adds bunch of useful features
+pkgver = 2.0.12
+pkgrel = 6
+url = https://www.labymod.net
+arch = x86_64
+license = unknown
+options = !strip
+source = https://releases.r2.labymod.net/launcher/linux/x64/LabyMod%20Launcher-latest.AppImage
+sha256sums = SKIP
pkgname = labymod-appimage
diff --git a/PKGBUILD b/PKGBUILD
index c2d68a9cd865..c0c2c38b5ac1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,29 +2,21 @@
# Maintainer: holybaechu <holyb@holyb.xyz>
# As of 1.0.32, the hash check is skipped.
-# Labymod unfortunately does not provide version specific download links.
-# As a result, this PKGBUILD always has to download the latest version.
-
-# This unfortunately makes it so that if the downloaded launcher is more recent than the
-# one here, the hash check will fail and the package won't be installable.
-
-# The pkgver will still be updated when new versions come out so that players get updates.
-
-# Note: apparently there IS an endpoint to get a specific version's jar. Will update soon-ish.
pkgname=labymod-appimage
-_pkgname=labymodlauncher
pkgver=2.0.12
-pkgrel=5
+pkgrel=6
pkgdesc='LabyMod Launcher for launching LabyMod, which is a Minecraft client that adds bunch of useful features'
url=https://www.labymod.net
arch=(x86_64)
license=(unknown)
depends=(fuse xorg-xrandr)
options=(!strip)
-_appimage="LabyMod%20Launcher-latest.AppImage"
-source=("https://releases.r2.labymod.net/launcher/linux/x64/LabyMod%20Launcher-latest.AppImage")
+source=("https://releases.r2.labymod.net/launcher/linux/x64/LabyMod%20Launcher-${pkgver}.AppImage")
sha256sums=('SKIP')
+_pkgname=labymodlauncher
+_appimage="LabyMod%20Launcher-${pkgver}.AppImage"
+
prepare() {
chmod +x "${_appimage}"
./"${_appimage}" --appimage-extract
@@ -40,46 +32,36 @@ build() {
}
package() {
+ mkdir -p "${pkgdir}/opt/${_pkgname}"
+
# AppImage
- sudo cp -a \
- "${srcdir}/squashfs-root/." \
- "/opt/${_pkgname}/"
+ cp -a \
+ "${srcdir}/${_appimage}" \
+ "${pkgdir}/opt/${_pkgname}/${_pkgname}.AppImage"
# Desktop file
install -Dm644 \
- "/opt/${_pkgname}/${_pkgname}.desktop" \
- "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+ "${srcdir}/squashfs-root/${_pkgname}.desktop" \
+ "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
# Replace default Electron icons with LabyMod icons
- convert -resize 16x16 \
- "/opt/${_pkgname}/resources/icons/icon.png" \
- "/opt/${_pkgname}/usr/share/icons/hicolor/16x16/apps/${_pkgname}.png"
- convert -resize 32x32 \
- "/opt/${_pkgname}/resources/icons/icon.png" \
- "/opt/${_pkgname}/usr/share/icons/hicolor/32x32/apps/${_pkgname}.png"
- convert -resize 48x48 \
- "/opt/${_pkgname}/resources/icons/icon.png" \
- "/opt/${_pkgname}/usr/share/icons/hicolor/48x48/apps/${_pkgname}.png"
- convert -resize 64x64 \
- "/opt/${_pkgname}/resources/icons/icon.png" \
- "/opt/${_pkgname}/usr/share/icons/hicolor/64x64/apps/${_pkgname}.png"
- convert -resize 128x128 \
- "/opt/${_pkgname}/resources/icons/icon.png" \
- "/opt/${_pkgname}/usr/share/icons/hicolor/128x128/apps/${_pkgname}.png"
- convert -resize 256x256 \
- "/opt/${_pkgname}/resources/icons/icon.png" \
- "/opt/${_pkgname}/usr/share/icons/hicolor/256x256/apps/${_pkgname}.png"
+ resolutions="16x16 32x32 48x48 64x64 128x128 256x256"
+ for resolution in $resolutions; do
+ convert -resize $resolution \
+ "${srcdir}/squashfs-root/resources/icons/icon.png" \
+ "${srcdir}/squashfs-root//usr/share/icons/hicolor/${resolution}/apps/${_pkgname}.png"
+ done
# Icon images
install -dm755 "${pkgdir}/usr/share/"
cp -a \
- "/opt/${_pkgname}/usr/share/icons" \
+ "${srcdir}/squashfs-root/usr/share/icons" \
"${pkgdir}/usr/share"
# Symlink executable
install -dm755 "${pkgdir}/usr/bin"
ln -s \
- "/opt/${_pkgname}/labymodlauncher" \
+ "/opt/${_pkgname}/${_pkgname}.AppImage" \
"${pkgdir}/usr/bin/${_pkgname}"
}
diff --git a/cleanup.sh b/cleanup.sh
new file mode 100755
index 000000000000..b7c82c22652a
--- /dev/null
+++ b/cleanup.sh
@@ -0,0 +1,4 @@
+find . -maxdepth 1 -name labymod-appimage-*-x86_64.pkg.tar.zst -delete
+find . -maxdepth 1 -name LabyMod%20Launcher-*.AppImage -delete
+rm -rf src
+rm -rf pkg \ No newline at end of file