blob: cf9e6ca30a9d086244c6de1f3f2fd8953028e12d (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
# Contributor: Kevin Puertas <kevinpr@jkanetwork.com>
# Contributor: Eric Engestrom <arch.aur@engestrom.ch>
# Helper: paulequilibrio
pkgname=gdevelop-bin
_pkgname=GDevelop
pkgver=5.4.219
_electronversion=18
pkgrel=1
pkgdesc="A full-featured, no-code, open-source game development software.(Prebuilt version.Use system-wide electron)"
arch=(
'aarch64'
'x86_64'
)
url='https://gdevelop.io/'
_ghurl="https://github.com/4ian/GDevelop"
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
'java-runtime'
)
makedepends=(
'fuse2'
'asar'
)
options=('!strip')
source=(
"LICENSE-${pkgver}.md::https://raw.githubusercontent.com/4ian/GDevelop/v${pkgver}/LICENSE.md"
"${pkgname%-bin}.sh"
)
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-5-${pkgver}-arm64.AppImage")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-5-${pkgver}.AppImage")
sha256sums=('0620d885ddbc88e952f99090d767de08671b6a81e5c10900ef5b949531460b92'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
sha256sums_aarch64=('9458e0c294ba0674c75f4d8dbc8fa40c63c1e02a2f262264da61460cfb0ce241')
sha256sums_x86_64=('77fcb2a12440d12ab404530e8ca7614bf9c57c5d967aa75e07782592fb9ea145')
build() {
sed -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
s/@runname@/app.asar/g
s/@cfgdirname@/${_appname}/g
s/@options@//g
" -i "${srcdir}/${pkgname%-bin}.sh"
chmod a+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" "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
asar e "${srcdir}/squashfs-root/resources/app.asar" "${srcdir}/app.asar.unpacked"
sed -i "s/if (isDev)/if (!isDev)/g;s/isDev,/\/\/isDev,/g;s/devTools,/\/\/devTools,/g" "${srcdir}/app.asar.unpacked/main.js"
asar p "${srcdir}/app.asar.unpacked" "${srcdir}/app.asar"
find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} \;
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
cp -Pr --no-preserve=ownership "${srcdir}/squashfs-root/resources/"{app.asar.unpacked,GDJS,preview_node_modules} "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/swiftshader/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/swiftshader"
install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib"
_icon_sizes=(16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024)
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}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/LICENSE-${pkgver}.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}
|