blob: cbc9d8c8fab129b69439558dad3221d7f0471d0b (
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
|
# Maintainer: Thomas Weber <contact at turbowarp dot org>
_electron=29
pkgname=turbowarp-desktop-bin
pkgver=1.12.3
pkgrel=3
pkgdesc="Scratch mod with a compiler to run projects faster, dark mode for your eyes, a bunch of addons to improve the editor, and more."
arch=("any")
url="https://desktop.turbowarp.org/"
license=("GPL3")
depends=("electron$_electron")
source=("$pkgname-$pkgver.tar.gz::https://github.com/TurboWarp/desktop/releases/download/v$pkgver/TurboWarp-linux-armv7l-$pkgver.tar.gz")
noextract=("$pkgname-$pkgver.tar.gz")
sha256sums=('f2cf90378f9a903d8ae7b8bc5099b7ad21ff3e2327cd43bf0be7b7583afc51d0')
prepare() {
mkdir -p "$srcdir/$pkgname-$pkgver"
bsdtar -xf "$pkgname-$pkgver.tar.gz" -C "$srcdir/$pkgname-$pkgver" --strip-components 1
}
package() {
# launch script
install -Dm755 /dev/null "$pkgdir/usr/bin/turbowarp-desktop"
echo '#!/bin/sh' >> "$pkgdir/usr/bin/turbowarp-desktop"
# TW_DIST_ID appears as "distribution" in ? > about menu
echo 'export TW_DIST_ID=linux-aur' >> "$pkgdir/usr/bin/turbowarp-desktop"
# TW_DISABLE_UPDATE_CHECKER disables in-app update checker as updates are managed by the AUR package and whatever helper you use
echo 'export TW_DISABLE_UPDATE_CHECKER=1' >> "$pkgdir/usr/bin/turbowarp-desktop"
echo "exec electron$_electron /usr/share/turbowarp-desktop/app.asar "'"$@"' >> "$pkgdir/usr/bin/turbowarp-desktop"
# .desktop file
install -Dm755 "$srcdir/$pkgname-$pkgver/linux-files/org.turbowarp.TurboWarp.desktop" "$pkgdir/usr/share/applications/turbowarp-desktop.desktop"
sed -i '/^#/d' "$pkgdir/usr/share/applications/turbowarp-desktop.desktop"
sed -i 's/^Exec=.*/Exec=turbowarp-desktop %U/' "$pkgdir/usr/share/applications/turbowarp-desktop.desktop"
sed -i 's/^Icon=.*/Icon=turbowarp-desktop/' "$pkgdir/usr/share/applications/turbowarp-desktop.desktop"
# mime type metadata
install -Dm644 "$srcdir/$pkgname-$pkgver/linux-files/org.turbowarp.TurboWarp.mime.xml" "$pkgdir/usr/share/mime/packages/turbowarp-desktop.xml"
sed -i 's/org\.turbowarp\.TurboWarp/turbowarp-desktop/' "$pkgdir/usr/share/mime/packages/turbowarp-desktop.xml"
# icon
install -Dm644 "$srcdir/$pkgname-$pkgver/resources/icon.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/turbowarp-desktop.png"
# app files
mkdir -p "$pkgdir/usr/share/turbowarp-desktop"
cp -r "$srcdir/$pkgname-$pkgver/resources"/* "$pkgdir/usr/share/turbowarp-desktop"
}
|