fe8d8632e1
Closes: #12267 [via git-merge-pr]
43 lines
1.1 KiB
Bash
43 lines
1.1 KiB
Bash
# Template file for 'vscode'
|
|
pkgname=vscode
|
|
version=1.21.0
|
|
revision=1
|
|
only_for_archs="i686 x86_64"
|
|
nocross=yes
|
|
nostrip=yes
|
|
hostmakedepends="pkg-config python nodejs"
|
|
makedepends="libX11-devel libxkbfile-devel libsecret-devel"
|
|
depends="GConf libXtst libxkbfile nss"
|
|
short_desc="Microsoft Code for Linux"
|
|
maintainer="Julio Galvan <juliogalvan@protonmail.com>"
|
|
license="MIT"
|
|
homepage="https://code.visualstudio.com/"
|
|
distfiles="https://github.com/Microsoft/vscode/archive/${version}.tar.gz"
|
|
checksum=d4773e3c136a311098c245a42f671eb1c90382f8e199f73dca500b0c15e41ba4
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686) _ARCH="ia32";;
|
|
x86_64) _ARCH="x64";;
|
|
esac
|
|
|
|
do_build() {
|
|
npm install -g gulp yarn
|
|
yarn install --arch=${_ARCH}
|
|
/usr/bin/node --max_old_space_size=2048 /usr/bin/gulp vscode-linux-${_ARCH}
|
|
}
|
|
|
|
do_install() {
|
|
cd ../VSCode-linux-${_ARCH}
|
|
|
|
sed -i "20,31 d" bin/code-oss
|
|
sed -i "20iVSCODE_PATH=\"/usr/share/code-oss\"" bin/code-oss
|
|
vbin bin/code-oss
|
|
|
|
vlicense resources/app/LICENSE.txt
|
|
|
|
vmkdir usr/share/applications
|
|
vcopy ${FILESDIR}/code.desktop usr/share/applications/
|
|
|
|
vmkdir usr/share/code-oss
|
|
vcopy ./* usr/share/code-oss
|
|
}
|