Archived
55 lines
2.5 KiB
Bash
55 lines
2.5 KiB
Bash
# Maintainer: D. Can Celasun <can[at]dcc[dot]im>
|
|
|
|
pkgname=visual-studio-code-bin
|
|
_pkgname=visual-studio-code
|
|
pkgver=1.124.0
|
|
pkgrel=1
|
|
pkgdesc="Visual Studio Code (vscode): Editor for building and debugging modern web and cloud applications (official binary version)"
|
|
arch=('x86_64' 'aarch64' 'armv7h')
|
|
url="https://code.visualstudio.com/"
|
|
license=('custom: commercial')
|
|
provides=('code' 'vscode')
|
|
conflicts=('code')
|
|
# Upstream has signature verification for extensions and stripping breaks it
|
|
# See https://github.com/microsoft/vscode/issues/223455#issuecomment-2610001754
|
|
options=(!strip)
|
|
install=$pkgname.install
|
|
# lsof: needed for terminal splitting, see https://github.com/Microsoft/vscode/issues/62991
|
|
# xdg-utils: needed for opening web links with xdg-open
|
|
depends=(libxkbfile gnupg gtk3 libsecret nss gcc-libs libnotify libxss glibc lsof shared-mime-info xdg-utils alsa-lib)
|
|
optdepends=('glib2: Needed for move to trash functionality'
|
|
'libdbusmenu-glib: Needed for KDE global menu'
|
|
'org.freedesktop.secrets: Needed for settings sync'
|
|
# See https://github.com/MicrosoftDocs/live-share/issues/4650
|
|
'icu69: Needed for live share' )
|
|
source=(${_pkgname}-bin.sh)
|
|
source_x86_64=(code_${pkgver}_amd64.deb::https://update.code.visualstudio.com/${pkgver}/linux-deb-x64/stable)
|
|
source_aarch64=(code_${pkgver}_arm64.deb::https://update.code.visualstudio.com/${pkgver}/linux-deb-arm64/stable)
|
|
source_armv7h=(code_${pkgver}_armhf.deb::https://update.code.visualstudio.com/${pkgver}/linux-deb-armhf/stable)
|
|
sha256sums=('bd0d9edf69283ebdf4e73e0a7b168d2fcf50acbd01f63674cad93ed4fe42fdad')
|
|
sha256sums_x86_64=('544f8e6638be2b5ad00be8609ba192860733ffd5b60572755f942d2ca4d98f8b')
|
|
sha256sums_aarch64=('1fa99070d580849680ca3fefe00a06df36d155d03bed948cb98881d3acf0a852')
|
|
sha256sums_armv7h=('562a10107bf25231898d37038a1b0579c7c66e6ed6fa9b4ffa90c04c24c67e70')
|
|
|
|
package() {
|
|
bsdtar -xf data.tar.xz -C "${pkgdir}/"
|
|
|
|
install -d "${pkgdir}/usr/bin"
|
|
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
|
|
ln -s /usr/share/code/resources/app/LICENSE.rtf \
|
|
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.rtf"
|
|
|
|
# Launcher
|
|
install -m755 "${srcdir}/${_pkgname}-bin.sh" "${pkgdir}/usr/bin/code"
|
|
|
|
# Fix the desktop entries
|
|
sed -i \
|
|
-e 's/^\(Exec=\)[^ ]*/\1code/g' \
|
|
"${pkgdir}"/usr/share/applications/*.desktop
|
|
|
|
# setuid on chrome-sandbox
|
|
# Comment out if using a kernel without user namespaces, like linux-hardened
|
|
chmod u-s "${pkgdir}/usr/share/code/chrome-sandbox"
|
|
}
|