-
Notifications
You must be signed in to change notification settings - Fork 1
/
PKGBUILD.electron
88 lines (74 loc) · 2.71 KB
/
PKGBUILD.electron
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer: LiarOnce <liaronce@hotmail.com>
_pkgname=vscodium
_electron=electron22
_nodejs="18.18.0"
pkgname=${_pkgname}-electron
pkgver=1.85.0.23343
pkgrel=1
pkgdesc="VS Code without MS branding/telemetry/licensing. - System-wide Electron edition"
arch=('x86_64' 'aarch64' 'armv7h' 'loong64')
url="https://github.com/VSCodium/vscodium"
license=('MIT')
depends=("$_electron-bin" 'libsecret' 'libx11' 'libxkbfile' 'ripgrep')
optdepends=('x11-ssh-askpass: SSH authentication'
'gvfs: For move to trash functionality'
'libdbusmenu-glib: For KDE global menu')
makedepends=('git' 'python' 'jq' 'nodejs-lts-hydrogen' 'npm' 'yarn')
conflicts=('vscodium')
source=("git+https://hub.fgit.cf/VSCodium/vscodium.git#tag=${pkgver}"
"vscodium-electron.patch"
"vscodium-loong64.patch"
"${_pkgname}.sh"
"${_pkgname}.js"
"${_pkgname}.desktop"
"${_pkgname}-uri-handler.desktop")
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')
shopt -s extglob
# Even though we don't officially support other archs, let's allow the
# user to use this PKGBUILD to compile the package for their architecture.
case "$CARCH" in
i686)
_vscode_arch=ia32
;;
x86_64)
_vscode_arch=x64
;;
armv7h)
_vscode_arch=arm
;;
loong64)
_vscode_arch=loong64
;;
*)
# Needed for mksrcinfo
_vscode_arch=DUMMY
;;
esac
prepare(){
echo "Skip prepare"
}
build() {
echo "Skip build"
}
package() {
cd "$srcdir/vscodium/VSCode-linux-$_vscode_arch"
install -Dm644 resources/app/LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
install -Dm644 resources/app/ThirdPartyNotices.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
install -Dm755 "$srcdir/vscodium-electron.sh" "$pkgdir/usr/bin/${_pkgname}"
ln -s "/usr/bin/${_pkgname}" "${pkgdir}/usr/bin/codium"
install -Dm755 "$srcdir/vscodium-electron.js" "$pkgdir/usr/lib/${_pkgname}/vscodium.js"
install -dm755 "$pkgdir/usr/lib/${_pkgname}"
cp -r --no-preserve=ownership --preserve=mode resources/app/!(LICENSE.txt|ThirdPartyNotices.txt) "$pkgdir/usr/lib/${_pkgname}/"
ln -sf /usr/bin/rg "$pkgdir/usr/lib/$_pkgname/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg"
install -Dm644 "$srcdir/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
install -Dm644 "$srcdir/${_pkgname}-uri-handler.desktop" "${pkgdir}/usr/share/applications/${_pkgname}-uri-handler.desktop"
install -Dm 644 "resources/completions/bash/codium" "$pkgdir/usr/share/bash-completion/completions/codium"
install -Dm 644 "resources/completions/zsh/_codium" "$pkgdir/usr/share/zsh/site-functions/_codium"
install -Dm644 "resources/app/resources/linux/code.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
}