diff options
author | Michael Hansen | 2017-12-18 15:09:23 -0800 |
---|---|---|
committer | Michael Hansen | 2017-12-18 15:09:23 -0800 |
commit | 52e99c60767c423475d63319f95bd0e5dbed130f (patch) | |
tree | d860f1c7dc590037dba20a68639d290d70583696 | |
parent | 820a8c0fba577893ddad0678429784b6b14d17d9 (diff) | |
download | aur-52e99c60767c423475d63319f95bd0e5dbed130f.tar.gz |
Re-brand without Visual Studio name and keep product patch restricted to open information. Also fixes side-by-side installation with code (OSS version)
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | code-git.desktop | 29 | ||||
-rw-r--r-- | product_json.patch | 12 | ||||
-rw-r--r-- | startup_script.patch | 2 | ||||
-rw-r--r-- | visual-studio-code-git.desktop | 9 | ||||
-rw-r--r-- | visual-studio-code-git.nonfree.install | 15 |
7 files changed, 70 insertions, 79 deletions
@@ -1,10 +1,10 @@ # Generated by mksrcinfo v8 -# Sun Dec 10 18:50:38 UTC 2017 -pkgbase = visual-studio-code-git - pkgdesc = Visual Studio Code for Linux, Open Source version from git - pkgver = 1.16.0.r4189.g6e71921951 +# Mon Dec 18 23:07:29 UTC 2017 +pkgbase = code-git + pkgdesc = Microsoft Code for Linux, Open Source version from git + pkgver = 1.16.0.r4621.g783a0aafad pkgrel = 1 - url = https://code.visualstudio.com/ + url = https://github.com/Microsoft/vscode arch = i686 arch = x86_64 arch = armv7h @@ -23,16 +23,16 @@ pkgbase = visual-studio-code-git depends = libxkbfile depends = nss depends = alsa-lib - provides = vscode-oss - provides = visual-studio-code-oss - conflicts = vscode-oss - conflicts = visual-studio-code-oss + provides = visual-studio-code-git + conflicts = visual-studio-code-git source = git+https://github.com/Microsoft/vscode + source = code-git.desktop source = startup_script.patch - source = visual-studio-code-git.desktop + source = product_json.patch sha256sums = SKIP - sha256sums = 8b2feded3382e5bf6b5b292c14083bfc536c05cd00f3235dd22b75b67fba134d - sha256sums = f853d7d998251223b0516928a2189e1e68a312bd732f18dc8d59892659beeae9 + sha256sums = 4507d6aac23cc1135feb68c1fcaa8b4b41b42f4806575d38de0f93474a3fb8db + sha256sums = 7447807230c09b80529e5cde4a1abfbb687937b16790b77a227ae39ba4c603ce + sha256sums = c402b3bd77530deea42315a9fb0fa4165926ff003179e0ac28b82c3f9acc93b4 -pkgname = visual-studio-code-git +pkgname = code-git @@ -1,37 +1,27 @@ # Maintainer: Michael Hansen <zrax0111 gmail com> # Contributor: Francisco Magalhães <franmagneto gmail com> -# Set this to 1 if you want to enable the proprietary Visual Studio Code -# features. Leaving this at 0 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=0 - -pkgname=visual-studio-code-git -pkgdesc='Visual Studio Code for Linux, Open Source version from git' -pkgver=1.16.0.r4189.g6e71921951 +pkgname=code-git +pkgdesc='Microsoft Code for Linux, Open Source version from git' +pkgver=1.16.0.r4621.g783a0aafad pkgrel=1 arch=('i686' 'x86_64' 'armv7h') -url='https://code.visualstudio.com/' +url='https://github.com/Microsoft/vscode' license=('MIT') makedepends=('npm' 'nodejs>=6.8.0' 'gulp' 'python2' 'git' 'yarn') depends=('gtk2' 'gconf' 'libnotify' 'libxss' 'libxtst' 'libxkbfile' 'nss' 'alsa-lib') -conflicts=('vscode-oss' 'visual-studio-code-oss') -provides=('vscode-oss' 'visual-studio-code-oss') +conflicts=('visual-studio-code-git') +provides=('visual-studio-code-git') source=("git+https://github.com/Microsoft/vscode" + "${pkgname}.desktop" "startup_script.patch" - "${pkgname}.desktop") + "product_json.patch") sha256sums=('SKIP' - '8b2feded3382e5bf6b5b292c14083bfc536c05cd00f3235dd22b75b67fba134d' - 'f853d7d998251223b0516928a2189e1e68a312bd732f18dc8d59892659beeae9') - -if (( VSCODE_NONFREE )); then - source+=('product_json.patch') - sha256sums+=('e90f9d69bd42c0d9fc5f081d3bf7ca307df53e3553efadf00d62ced66b1bb070') - install="${pkgname}.nonfree.install" - license+=('proprietary') -fi + '4507d6aac23cc1135feb68c1fcaa8b4b41b42f4806575d38de0f93474a3fb8db' + '7447807230c09b80529e5cde4a1abfbb687937b16790b77a227ae39ba4c603ce' + 'c402b3bd77530deea42315a9fb0fa4165926ff003179e0ac28b82c3f9acc93b4') case "$CARCH" in i686) @@ -57,13 +47,13 @@ pkgver() { prepare() { cd "${srcdir}/vscode" - 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 + # This patch no longer contains proprietary modifications. + # See https://github.com/Microsoft/vscode/issues/31168 for details. + 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 } build() { @@ -84,14 +74,14 @@ build() { } package() { - install -m 0755 -d "${pkgdir}/usr/share/code-oss" - cp -r "${srcdir}/VSCode-linux-${_vscode_arch}"/* "${pkgdir}/usr/share/code-oss" + install -m 0755 -d "${pkgdir}/usr/share/code-git" + cp -r "${srcdir}/VSCode-linux-${_vscode_arch}"/* "${pkgdir}/usr/share/code-git" # Put the startup script in /usr/bin - mv "${pkgdir}/usr/share/code-oss/bin" "${pkgdir}/usr" + mv "${pkgdir}/usr/share/code-git/bin" "${pkgdir}/usr" - # Add symlink to the name we provided in older versions of this package - ln -s code-oss "${pkgdir}/usr/bin/${pkgname}" + # Avoid conflicting with the stable OSS build + mv "${pkgdir}/usr/bin/code-oss" "${pkgdir}/usr/bin/code-git" # Add .desktop file install -D -m644 "${srcdir}/${pkgname}.desktop" \ diff --git a/code-git.desktop b/code-git.desktop new file mode 100644 index 000000000000..8ed438c2ce52 --- /dev/null +++ b/code-git.desktop @@ -0,0 +1,29 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Microsoft Code (Open Source - Git) +Comment=Code Editing. Redefined. +GenericName=Text Editor +Exec=/usr/bin/code-git --unity-launch %F +Icon=/usr/share/code-git/resources/app/resources/linux/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=/usr/bin/code-git --new-window %F +Icon=/usr/share/code-git/resources/app/resources/linux/code.png diff --git a/product_json.patch b/product_json.patch index a9a4237f1cb6..99ad76c9d160 100644 --- a/product_json.patch +++ b/product_json.patch @@ -5,11 +5,11 @@ diff -rupN a/product.json b/product.json { "nameShort": "Code - OSS", - "nameLong": "Code - OSS", -+ "nameLong": "Visual Studio Code - OSS", ++ "nameLong": "Code - OSS (Git)", "applicationName": "code-oss", "dataFolderName": ".vscode-oss", "win32MutexName": "vscodeoss", -@@ -12,5 +12,19 @@ +@@ -12,5 +12,15 @@ "win32AppUserModelId": "Microsoft.CodeOSS", "darwinBundleIdentifier": "com.visualstudio.code.oss", "reportIssueUrl": "https://github.com/Microsoft/vscode/issues/new", @@ -17,18 +17,14 @@ diff -rupN a/product.json b/product.json -} \ No newline at end of file + "urlProtocol": "code-oss", -+ "welcomePage": "http://go.microsoft.com/fwlink/?LinkId=723048", + "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": "http://go.microsoft.com/fwlink/?LinkID=533484#vscode", -+ "releaseNotesUrl": "http://go.microsoft.com/fwlink/?LinkID=533483#vscode", -+ "twitterUrl": "http://go.microsoft.com/fwlink/?LinkID=533687", -+ "requestFeatureUrl": "http://go.microsoft.com/fwlink/?LinkID=533482", -+ "privacyStatementUrl": "http://go.microsoft.com/fwlink/?LinkID=528096&clcid=0x409", ++ "documentationUrl": "https://github.com/microsoft/vscode-docs", ++ "requestFeatureUrl": "https://github.com/Microsoft/vscode/issues", + "commit": "@COMMIT@", + "date": "@DATE@" +} diff --git a/startup_script.patch b/startup_script.patch index a88aee3b27c6..cc4b200de646 100644 --- a/startup_script.patch +++ b/startup_script.patch @@ -17,7 +17,7 @@ diff -rupN a/bin/code-oss b/bin/code-oss - VSCODE_PATH="/usr/share/code-oss" - fi -fi -+VSCODE_PATH="/usr/share/code-oss" ++VSCODE_PATH="/usr/share/code-git" ELECTRON="$VSCODE_PATH/code-oss" CLI="$VSCODE_PATH/resources/app/out/cli.js" diff --git a/visual-studio-code-git.desktop b/visual-studio-code-git.desktop deleted file mode 100644 index 76dd9c926c80..000000000000 --- a/visual-studio-code-git.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Visual Studio Code (Open Source) -Comment=Source code editor and debugger for modern web and cloud applications -Version=1.0 -Exec="/usr/bin/code-oss" %F -Icon=/usr/share/code-oss/resources/app/resources/linux/code.png -Type=Application -Categories=Development; diff --git a/visual-studio-code-git.nonfree.install b/visual-studio-code-git.nonfree.install deleted file mode 100644 index 3f51ea6e3373..000000000000 --- a/visual-studio-code-git.nonfree.install +++ /dev/null @@ -1,15 +0,0 @@ -_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 -} |