blob: e7ccdb5c2c57cadf59002959653d4759d74ffe18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=tjmc-launcher-bin
_pkgname=TJMC-Launcher
pkgver=0.2.10
_electronversion=23
pkgrel=2
pkgdesc="A simple to use, extremely fast, and well supported app, that allows you to install pure and modded versions of Java Minecraft.(Prebuilt version.Use system-wide electron)"
arch=(
'aarch64'
'x86_64'
)
url="https://launcher.tjmc.ru/"
_ghurl="https://github.com/tjmcraft/TJMC-Launcher"
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
)
makedepends=(
'fuse2'
)
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-setup-arm64.AppImage")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-setup-x86_64.AppImage")
source=(
"LICENSE-${pkgver}::https://raw.githubusercontent.com/tjmcraft/TJMC-Launcher/v${pkgver}/LICENSE"
"${pkgname%-bin}.sh"
)
sha256sums=('1a25e3b0f4bf16543e5f802cf6d9d189bcae27617ca8be936ad866a8955d9ce6'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
sha256sums_aarch64=('768fca770466025a7d478ea4ccb06451203db87a21542e80aa2bbe474ea98a3f')
sha256sums_x86_64=('140c56f94e27f78c230b63bb39b1c44492a21203749b601d31f453b84c4ceced')
prepare() {
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
s/@runname@/app.asar/g
s/@cfgdirname@/${_pkgname}/g
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
" "${srcdir}/${pkgname%-bin}.sh"
chmod +x "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" --appimage-extract > /dev/null
sed -i "s/AppRun --no-sandbox/${pkgname%-bin}/g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
_icon_sizes=(16x16 32x32 48x48 64x64 128x128 256x256 512x512)
for _icons in "${_icon_sizes[@]}";do
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
done
install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|