Skip to content

Commit

Permalink
add: lunarclient-app (#5138)
Browse files Browse the repository at this point in the history
Co-authored-by: Elsie <[email protected]>
  • Loading branch information
Mythbusters123 and Elsie19 authored Dec 29, 2023
1 parent ee34128 commit 962535d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ linux-wifi-hotspot-deb
lrz-syncshare-deb
lsd-deb
lunacy-deb
lunarclient-app
lutris-deb
lyrebird-git
lyx
Expand Down
63 changes: 63 additions & 0 deletions packages/lunarclient-app/lunarclient-app.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
PACSTALL_DOWNLOADER=curl
_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 <[email protected]>"
_appimage="Lunar%20Client-${pkgver}.AppImage"
url="https://launcherupdates.lunarclientcdn.com/${_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 "${_desktopurl}"

_downloaded_icon_hash="$(sha256sum "${_pkgname}.png" | cut -d " " -f 1)"
_downloaded_desktop_hash="$(sha256sum "${_pkgname}.desktop" | cut -d " " -f 1)"

if [[ "${_downloaded_icon_hash}" != "${_iconhash}" ]]; then
fancy_message error "Hashes do not match for icon. Aborting..."
return 1
fi

if [[ "${_downloaded_desktop_hash}" != "${_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 \
"${_pkgname}.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"
}

0 comments on commit 962535d

Please sign in to comment.