2018-03-08 06:31:41 +00:00
|
|
|
# Template file for 'vscode'
|
|
|
|
pkgname=vscode
|
2018-07-24 00:01:48 +00:00
|
|
|
version=1.25.1
|
2018-08-02 07:11:28 +00:00
|
|
|
revision=2
|
|
|
|
hostmakedepends="pkg-config python nodejs-lts yarn"
|
2018-03-08 06:31:41 +00:00
|
|
|
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"
|
2018-07-24 00:01:48 +00:00
|
|
|
checksum=af95547a64647d4097c1b45902fc53f45d323f053a7558bfa42e1900621d972c
|
|
|
|
# Due to electron
|
|
|
|
only_for_archs="i686 x86_64"
|
|
|
|
nostrip_files="code-oss"
|
2018-03-08 06:31:41 +00:00
|
|
|
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
2018-08-01 13:03:42 +00:00
|
|
|
i686) broken="https://build.voidlinux.eu/builders/i686_builder/builds/10486/steps/shell_3/logs/stdio"
|
|
|
|
_ARCH="ia32";;
|
2018-03-08 06:31:41 +00:00
|
|
|
x86_64) _ARCH="x64";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
do_build() {
|
2018-07-24 00:01:48 +00:00
|
|
|
sed -i 's/\"enableTelemetry\":.*/\"enableTelemetry\": false,/g' product.json
|
|
|
|
echo > build/npm/preinstall.js
|
|
|
|
yarn install --ignore-engines --arch=${_ARCH}
|
|
|
|
yarn run gulp vscode-linux-${_ARCH}
|
2018-03-08 06:31:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2018-07-24 00:01:48 +00:00
|
|
|
vmkdir usr/lib
|
2018-03-08 06:31:41 +00:00
|
|
|
vmkdir usr/share/applications
|
|
|
|
vcopy ${FILESDIR}/code.desktop usr/share/applications/
|
2018-07-24 00:01:48 +00:00
|
|
|
mv ../VSCode-linux-${_ARCH} ${DESTDIR}/usr/lib/code-oss
|
|
|
|
vbin ${FILESDIR}/code
|
|
|
|
vlicense LICENSE.txt
|
2018-03-08 06:31:41 +00:00
|
|
|
}
|