summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD44
2 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e5dd5bcb5e6e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = lunar-client
+ pkgdesc = PvP Modpack for Minecraft 1.7, 1.8, 1.12, 1.15 and 1.16
+ pkgver = 2.4.0
+ pkgrel = 1
+ url = https://lunarclient.com/
+ arch = x86_64
+ license = unknown
+ options = !strip
+ source = https://launcherupdates.lunarclientcdn.com/Lunar Client-2.4.0.AppImage
+ sha256sums = SKIP
+
+pkgname = lunar-client
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..589633b23b88
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: monosans <hsyqixco at protonmail dot com>
+
+pkgname=lunar-client
+_pkgname=lunarclient
+pkgver=2.4.0
+pkgrel=1
+pkgdesc='PvP Modpack for Minecraft 1.7, 1.8, 1.12, 1.15 and 1.16'
+url='https://lunarclient.com/'
+arch=('x86_64')
+license=('unknown')
+options=(!strip)
+_appimage="Lunar Client-${pkgver}.AppImage"
+source=("https://launcherupdates.lunarclientcdn.com/${_appimage}")
+sha256sums=('SKIP')
+
+prepare() {
+ chmod +x "${_appimage}"
+ ./"${_appimage}" --appimage-extract
+}
+
+build() {
+ # Adjust .desktop so it will work outside of AppImage container
+ sed -i -E "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_pkgname}|"\
+ "squashfs-root/${_pkgname}.desktop"
+ # Fix permissions; .AppImage permissions are 700 for all directories
+ chmod -R a-x+rX squashfs-root/usr
+}
+
+package() {
+ # AppImage
+ install -Dm755 "${srcdir}/${_appimage}" "${pkgdir}/opt/${_pkgname}/${_pkgname}.AppImage"
+
+ # Desktop file
+ install -Dm644 "${srcdir}/squashfs-root/${_pkgname}.desktop"\
+ "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+
+ # Icon images
+ install -dm755 "${pkgdir}/usr/share/"
+ cp -a "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share/"
+
+ # Symlink executable
+ install -dm755 "${pkgdir}/usr/bin"
+ ln -s "/opt/${_pkgname}/${_pkgname}.AppImage" "${pkgdir}/usr/bin/${_pkgname}"
+}