Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: lunarclient-app #5138

Merged
merged 10 commits into from
Dec 29, 2023
1 change: 1 addition & 0 deletions packagelist
Original file line number Diff line number Diff line change
@@ -241,6 +241,7 @@ linux-wifi-hotspot-deb
lrz-syncshare-deb
lsd-deb
lunacy-deb
lunarclient-app
lutris-deb
lyrebird-git
lyx
62 changes: 62 additions & 0 deletions packages/lunarclient-app/lunarclient-app.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
_pkgname=lunarclient
name="${_pkgname}-app"
repology=("project: lunar-client")
pkgver="3.1.3"
arch=("amd64")
pkgdesc="PvP modpack for all modern versions of Minecraft"
homepage="https://lunarclient.com"
makedepends=("libfuse2")
replace=("lunarclient" "lunar-client")
breaks=("lunarclient-deb" "lunarclient-bin")
maintainer="Mythbusters123 <atr10605@icloud.com>"
#_appimage="Lunar%20Client-${pkgver}.AppImage"
#url="https://launcherupdates.lunarclientcdn.com/${_appimage}"
# TEMPORARY ONLY UNTIL DOWNLOADING IS FIXED
_appimage="LunarClient-${pkgver}.AppImage"
url="https://cdn.themyth.dev/${_appimage}"
hash='f04f1364aa02f89c667f54e206326cc1f9bca8242ad2600a5cfbf748d91498b5'
_iconurl="https://raw.githubusercontent.com/Mythbusters123/lunarclient-app/main/${_pkgname}.png"
_iconhash='28d489d41431bdaa784342a227abdfbbb525bbe831f98d34747ec557b6e02f05'
_desktopurl="https://raw.githubusercontent.com/Mythbusters123/lunarclient-app/main/${_pkgname}.desktop"
_desktophash='74c099d70a70ae356547d75c49de409b2dbb8da221cfc9b9da4e4d86ca1f7870'

prepare() {
# Be extra careful!
wget -O "${_pkgname}.png" -q "${_iconurl}"
wget -O "${_pkgname}.desktop" -q "${_desktop}"

if [[ "$(sha256sum "${_pkgname}.png" | grep -o "[a-z0-9]*" | head -n1)" != "${_iconhash}" ]]; then
fancy_message error "Hashes do not match for icon. Aborting..."
return 1
fi

if [[ "$(sha256sum "${_pkgname}.desktop" | grep -o "[a-z0-9]*" | head -n1)" != "${_desktophash}" ]]; then
fancy_message error "Hashes do not match for desktop file. Aborting..."
return 1
fi
}

build() {
sed -i "s/REPLACE_VERSION/${pkgver}/" "${_pkgname}.desktop"
}

package() {
# AppImage
sudo install -Dm755 \
"${_appimage}" \
"${pkgdir}/usr/bin/${_pkgname}"

# Desktop file
sudo install -Dm644 \
"squashfs-root/launcher.desktop" \
"${pkgdir}/usr/share/applications/${_pkgname}.desktop"

# Icon image
sudo install -Dm644 \
"${_pkgname}.png" \
"${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
}
post_install() {
fancy_message warn "By using Lunar Client you agree to the Terms of Service and the Privacy Policy"
fancy_message warn "found at https://www.lunarclient.com/terms and https://www.lunarclient.com/privacy, respectively"
}