[arch-commits] Commit in code/repos (6 files)
Filipe Laíns
ffy00 at archlinux.org
Mon Sep 10 14:59:57 UTC 2018
Date: Monday, September 10, 2018 @ 14:59:56
Author: ffy00
Revision: 379216
archrelease: copy trunk to community-testing-x86_64
Added:
code/repos/community-testing-x86_64/
code/repos/community-testing-x86_64/PKGBUILD
(from rev 379215, code/trunk/PKGBUILD)
code/repos/community-testing-x86_64/code-liveshare.patch
(from rev 379215, code/trunk/code-liveshare.patch)
code/repos/community-testing-x86_64/code.desktop
(from rev 379215, code/trunk/code.desktop)
code/repos/community-testing-x86_64/code.sh
(from rev 379215, code/trunk/code.sh)
code/repos/community-testing-x86_64/product_json.patch
(from rev 379215, code/trunk/product_json.patch)
----------------------+
PKGBUILD | 106 +++++++++++++++++++++++++++++++++++++++++++++++++
code-liveshare.patch | 11 +++++
code.desktop | 29 +++++++++++++
code.sh | 3 +
product_json.patch | 21 +++++++++
5 files changed, 170 insertions(+)
Copied: code/repos/community-testing-x86_64/PKGBUILD (from rev 379215, code/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2018-09-10 14:59:56 UTC (rev 379216)
@@ -0,0 +1,106 @@
+# $Id$
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
+# Contriburtor: Michael Hansen <zrax0111 gmail com>
+# Contributor: Francisco Magalhães <franmagneto gmail com>
+
+pkgname=code
+pkgdesc='Microsoft Code -- The Open Source build of Visual Studio Code (vscode)'
+pkgver=1.27.1
+pkgrel=1
+arch=('x86_64')
+url='https://github.com/Microsoft/vscode'
+license=('MIT')
+depends=('gtk3' 'gconf' 'libnotify' 'libxss' 'libxtst' 'libxkbfile' 'nss' 'alsa-lib'
+ 'libx11' 'libxkbfile' 'libsecret' 'electron')
+makedepends=('nodejs-lts-carbon' 'gulp' 'python2' 'git' 'yarn' 'npm')
+source=("$pkgname::git+https://github.com/Microsoft/vscode#tag=$_pkgver"
+ 'code.desktop'
+ 'code.sh'
+ 'startup_script.patch'
+ 'product_json.patch'
+ 'code-liveshare.patch')
+sha512sums=('SKIP'
+ 'b43d83d811ec352a153c566ffb4ac2e7eb48e8f7e0fa6d140c1a91ac063663b25cf1900aea7cf35a0b5eccaa22783e94511fa381663999db952894de64ba6b90'
+ '754280ae37300a7706049c83c3cd6b441c58d90ae3eab723d0b721c4ac9321af49b7b491c7a4378487d0d0a4d81124bfc72ad6440bfdee046b5b1724045f3f1d'
+ 'bce6f9f9a745fd89916b93075a4748d1cd3b5ba58084e3e957310850c4cf64fe91eb5a63cfcc1f674511b59cebdddf2916028ab8b12bca82bb48035c76ca3170'
+ 'dcf52fa373a787cd94ce7ad216a269de3ca90b3f02cea1d635016d980e765a9cc040776ce4b4ef83721ab6f0d74efb7a3a9ca02fbdf3daa06653c766d36cde08'
+ '6080b9d30b2c852a831d4fa98be94e42eb7d94dfd5813bbe28410d031191c20563e4288d6b0062c74b635a962c3eba3533fcebeff1f67b4a8005a167c2f7fbf2')
+
+# Even though we don't officially support other archs, let's
+# allow the user to use this PKGBUILD to compile the package
+# for his architecture
+case "$CARCH" in
+ i686)
+ _vscode_arch=ia32
+ ;;
+ x86_64)
+ _vscode_arch=x64
+ ;;
+ armv7h)
+ _vscode_arch=arm
+ ;;
+ *)
+ # Needed for mksrcinfo
+ _vscode_arch=DUMMY
+ ;;
+esac
+
+prepare() {
+ cd $pkgname
+
+ # This patch no longer contains proprietary modifications.
+ # See https://github.com/Microsoft/vscode/issues/31168 for details.
+ patch -p1 < ../product_json.patch
+
+ # Set the commit and build date
+ local _commit=$(git rev-parse HEAD)
+ local _datestamp=$(date -u -Is | sed 's/\+00:00/Z/')
+ sed -e "s/@COMMIT@/$_commit/" -e "s/@DATE@/$_datestamp/" -i product.json
+
+ # See https://github.com/MicrosoftDocs/live-share/issues/262 for details
+ patch -p1 < ../code-liveshare.patch
+}
+
+build() {
+ cd $pkgname
+
+ yarn
+ yarn install --arch=$_vscode_arch # can't run --production :/
+
+ # The default memory limit may be too low for current versions of node
+ # to successfully build vscode. Uncomment this to set it to 2GB, or
+ # change it if this number still doesn't work for your system.
+ mem_limit="--max_old_space_size=2048"
+
+ if ! /usr/bin/node $mem_limit /usr/bin/gulp vscode-linux-$_vscode_arch-min
+ then
+ echo
+ echo "*** NOTE: If the build failed due to running out of file handles (EMFILE),"
+ echo "*** you will need to raise your max open file limit."
+ echo "*** You can check this for more information on how to increase this limit:"
+ echo "*** https://ro-che.info/articles/2017-03-26-increase-open-files-limit"
+ exit 1
+ fi
+
+ # Patch the startup script to know where the app is installed, rather
+ # than guessing...
+ cd ../VSCode-linux-$_vscode_arch
+ patch -p1 < ../startup_script.patch
+}
+
+package() {
+ # Install .asar files
+ install -dm 755 "$pkgdir"/usr/lib/$pkgname
+ cp -r --no-preserve=ownership --preserve=mode VSCode-linux-$_vscode_arch/resources/* "$pkgdir"/usr/lib/$pkgname/
+
+ # Add .desktop file
+ install -Dm 644 code.desktop "$pkgdir"/usr/share/applications/code.desktop
+ install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/resources/linux/code.png "$pkgdir"/usr/share/icons/code.png
+
+ # Install binary
+ install -Dm 755 code.sh "$pkgdir"/usr/bin/code
+
+ # Install license file
+ install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
Copied: code/repos/community-testing-x86_64/code-liveshare.patch (from rev 379215, code/trunk/code-liveshare.patch)
===================================================================
--- community-testing-x86_64/code-liveshare.patch (rev 0)
+++ community-testing-x86_64/code-liveshare.patch 2018-09-10 14:59:56 UTC (rev 379216)
@@ -0,0 +1,11 @@
+diff -rupN a/product.json b/product.json
+--- a/product.json 2018-05-08 09:26:25.618099994 -0700
++++ b/product.json 2018-05-08 09:26:47.388338276 -0700
+@@ -17,6 +17,7 @@
+ "reportIssueUrl": "https://github.com/Microsoft/vscode/issues/new",
+ "urlProtocol": "code-oss",
+ "extensionAllowedProposedApi": [
++ "ms-vsliveshare.vsliveshare",
+ "ms-vscode.node-debug",
+ "ms-vscode.node-debug2"
+ ],
Copied: code/repos/community-testing-x86_64/code.desktop (from rev 379215, code/trunk/code.desktop)
===================================================================
--- community-testing-x86_64/code.desktop (rev 0)
+++ community-testing-x86_64/code.desktop 2018-09-10 14:59:56 UTC (rev 379216)
@@ -0,0 +1,29 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Name=Microsoft Code (Open Source)
+Comment=Code Editing. Redefined.
+GenericName=Text Editor
+Exec=code %F
+Icon=/usr/share/icons/code.png
+Type=Application
+StartupNotify=true
+StartupWMClass=Code - OSS
+Categories=Utility;TextEditor;Development;IDE;
+MimeType=text/plain;inode/directory;
+Actions=new-window;
+Keywords=vscode;
+
+[Desktop Action new-window]
+Name=New Window
+Name[de]=Neues Fenster
+Name[es]=Nueva ventana
+Name[fr]=Nouvelle fenêtre
+Name[it]=Nuova finestra
+Name[ja]=新規ウインドウ
+Name[ko]=새 창
+Name[ru]=Новое окно
+Name[zh_CN]=新建窗口
+Name[zh_TW]=開新視窗
+Exec=code %F
+Icon=/usr/share/icons/code.png
Copied: code/repos/community-testing-x86_64/code.sh (from rev 379215, code/trunk/code.sh)
===================================================================
--- community-testing-x86_64/code.sh (rev 0)
+++ community-testing-x86_64/code.sh 2018-09-10 14:59:56 UTC (rev 379216)
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+electron /usr/lib/code/app/ --unity-launch "$@"
Copied: code/repos/community-testing-x86_64/product_json.patch (from rev 379215, code/trunk/product_json.patch)
===================================================================
--- community-testing-x86_64/product_json.patch (rev 0)
+++ community-testing-x86_64/product_json.patch 2018-09-10 14:59:56 UTC (rev 379216)
@@ -0,0 +1,21 @@
+diff --git a/product.json b/product.json
+index ed3ced1c1b..df707206d5 100644
+--- a/product.json
++++ b/product.json
+@@ -21,5 +21,15 @@
+ "extensionAllowedProposedApi": [
+ "ms-vscode.node-debug",
+ "ms-vscode.node-debug2"
+- ]
++ ],
++ "quality": "stable",
++ "extensionsGallery": {
++ "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
++ "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
++ "itemUrl": "https://marketplace.visualstudio.com/items"
++ },
++ "documentationUrl": "https://github.com/microsoft/vscode-docs",
++ "requestFeatureUrl": "https://github.com/Microsoft/vscode/issues",
++ "commit": "@COMMIT@",
++ "date": "@DATE@"
+ }
More information about the arch-commits
mailing list