diff options
author | Michael Hansen | 2016-11-15 13:05:38 -0800 |
---|---|---|
committer | Michael Hansen | 2016-11-15 13:05:38 -0800 |
commit | 2e3371a7cf3bf6add38bb80dee344775813b2020 (patch) | |
tree | d20f37a7f283fca9555073aa91c771ef45bfe9c4 | |
parent | 4574cf458fdc3df5afca6b4d6ba0ee2e9d592328 (diff) | |
download | aur-2e3371a7cf3bf6add38bb80dee344775813b2020.tar.gz |
Backport several updates from the stable version PKGBUILD
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | product_json.patch | 4 | ||||
-rw-r--r-- | visual-studio-code-git.nonfree.install | 15 |
4 files changed, 57 insertions, 21 deletions
@@ -1,18 +1,26 @@ # Generated by mksrcinfo v8 -# Tue Sep 6 02:18:44 UTC 2016 +# Tue Nov 15 21:05:04 UTC 2016 pkgbase = visual-studio-code-git pkgdesc = Visual Studio Code for Linux, Open Source version from git - pkgver = 1.1.0.insider.r4276.g2a215cc + pkgver = 1.1.0.insider.r6983.gd3171a3 pkgrel = 1 url = https://code.visualstudio.com/ + install = visual-studio-code-git.nonfree.install arch = i686 arch = x86_64 license = MIT + license = proprietary makedepends = npm + makedepends = nodejs>=6.8.0 makedepends = gulp makedepends = python2 depends = gtk2 depends = gconf + depends = libnotify + depends = libxss + depends = libxtst + depends = nss + depends = alsa-lib provides = vscode-oss provides = visual-studio-code-oss conflicts = vscode-oss @@ -22,7 +30,7 @@ pkgbase = visual-studio-code-git source = product_json.patch sha1sums = SKIP sha1sums = a42e461ed586ef0fd31ff911ad662135f4f602aa - sha1sums = 34758e925f36cabe6167198c9bd11c12b07b2052 + sha1sums = ba8febe936932080610d899fdb57294fc2f9f614 pkgname = visual-studio-code-git @@ -1,23 +1,33 @@ # Maintainer: Michael Hansen <zrax0111 gmail com> +# Set this to 0 if you want to include only the open-source Visual Studio Code +# components. This will cause the extension manager to work in a local-only +# mode (you'll have to download and install extensions manually). +[[ -z "$VSCODE_NONFREE" ]] && VSCODE_NONFREE=1 + pkgname=visual-studio-code-git pkgdesc='Visual Studio Code for Linux, Open Source version from git' -pkgver=1.1.0.insider.r4276.g2a215cc +pkgver=1.1.0.insider.r6983.gd3171a3 pkgrel=1 arch=('i686' 'x86_64') url='https://code.visualstudio.com/' license=('MIT') -makedepends=('npm' 'gulp' 'python2') -depends=('gtk2' 'gconf') +makedepends=('npm' 'nodejs>=6.8.0' 'gulp' 'python2') +depends=('gtk2' 'gconf' 'libnotify' 'libxss' 'libxtst' 'nss' 'alsa-lib') conflicts=('vscode-oss' 'visual-studio-code-oss') provides=('vscode-oss' 'visual-studio-code-oss') source=("git+https://github.com/Microsoft/vscode" - "${pkgname}.desktop" - 'product_json.patch') + "${pkgname}.desktop") sha1sums=('SKIP' - 'a42e461ed586ef0fd31ff911ad662135f4f602aa' - '34758e925f36cabe6167198c9bd11c12b07b2052') + 'a42e461ed586ef0fd31ff911ad662135f4f602aa') + +if (( VSCODE_NONFREE )); then + source+=('product_json.patch') + sha1sums+=('ba8febe936932080610d899fdb57294fc2f9f614') + install="${pkgname}.nonfree.install" + license+=('proprietary') +fi case "$CARCH" in i686) @@ -40,20 +50,23 @@ pkgver() { prepare() { cd "${srcdir}/vscode" - patch -p1 -i "${srcdir}/product_json.patch" - local _commit=$(cd "${srcdir}/vscode" && git rev-parse HEAD) - local _datestamp=$(date -u -Is | sed 's/\+00:00/Z/') - sed -e "s/@COMMIT@/${_commit}/g" -e "s/@DATE@/${_datestamp}/" \ - -i product.json + if (( VSCODE_NONFREE )); then + patch -p1 -i "${srcdir}/product_json.patch" + local _commit=$(cd "${srcdir}/vscode" && 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 + fi } build() { cd "${srcdir}/vscode" - ./scripts/npm.sh install + ./scripts/npm.sh install --arch=${_vscode_arch} - # The default memory limit is too low on some systems. This will set it - # to 2GB -- change it if this number doesn't work for your system + # The default memory limit is too low for current versions of node to + # successfully build vscode. This will set it to 2GB -- change it if + # this number still doesn't work for your system. node --max_old_space_size=2048 /usr/bin/gulp vscode-linux-${_vscode_arch} } @@ -63,7 +76,7 @@ package() { # Include symlink in system bin directory install -m 0755 -d "${pkgdir}/usr/bin" - ln -s '/opt/VSCode-OSS/code-oss' "${pkgdir}/usr/bin/${pkgname}" + ln -s '/opt/VSCode-OSS/bin/code-oss' "${pkgdir}/usr/bin/${pkgname}" # Add .desktop file install -D -m644 "${srcdir}/${pkgname}.desktop" \ diff --git a/product_json.patch b/product_json.patch index 1298192c9a60..a9a4237f1cb6 100644 --- a/product_json.patch +++ b/product_json.patch @@ -1,6 +1,6 @@ diff -rupN a/product.json b/product.json ---- a/product.json 2016-09-05 17:41:16.846929056 -0700 -+++ b/product.json 2016-09-05 17:39:51.536137928 -0700 +--- a/product.json 2016-09-08 14:48:45.419566181 -0700 ++++ b/product.json 2016-09-08 14:49:43.000000000 -0700 @@ -1,6 +1,6 @@ { "nameShort": "Code - OSS", diff --git a/visual-studio-code-git.nonfree.install b/visual-studio-code-git.nonfree.install new file mode 100644 index 000000000000..3f51ea6e3373 --- /dev/null +++ b/visual-studio-code-git.nonfree.install @@ -0,0 +1,15 @@ +_notice() { + echo + echo "NOTICE: This package includes proprietary configuration files which make" + echo "the package non-free and non-redistributable. If you wish to disable" + echo "the extra functionality and use the pure open-source package, read the" + echo "notice at the top of the PKGBUILD and set VSCODE_NONFREE=0" +} + +post_install() { + _notice +} + +post_upgrade() { + _notice +} |