diff options
author | Michael Hansen | 2016-03-09 09:45:20 -0800 |
---|---|---|
committer | Michael Hansen | 2016-03-09 09:45:20 -0800 |
commit | 3e6c2f651f7d90882fc087b8432c4484af4b61f4 (patch) | |
tree | f433281a4f925f5ce9ccc0da6209845fcdc2f6be | |
download | aur-3e6c2f651f7d90882fc087b8432c4484af4b61f4.tar.gz |
Add visual-studio-code-git package
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | product_json.patch | 29 | ||||
-rw-r--r-- | visual-studio-code-git.desktop | 7 |
5 files changed, 139 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4869d0d22c0e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +# Generated by mksrcinfo v8 +# Wed Mar 9 17:44:39 UTC 2016 +pkgbase = visual-studio-code-git + pkgdesc = Visual Studio Code for Linux, Open Source version from git + pkgver = 0.10.10.insiders.r334.g6580a4e + pkgrel = 1 + url = https://code.visualstudio.com/ + arch = i686 + arch = x86_64 + license = MIT + makedepends = npm + makedepends = gulp + makedepends = python2 + depends = gtk2 + depends = gconf + provides = vscode-oss + provides = visual-studio-code-oss + conflicts = vscode-oss + conflicts = visual-studio-code-oss + source = git+https://github.com/Microsoft/vscode + source = visual-studio-code-git.desktop + source = product_json.patch + sha1sums = SKIP + sha1sums = a42e461ed586ef0fd31ff911ad662135f4f602aa + sha1sums = ffe64521128379790749d7e61ba1eeeb7e732dec + +pkgname = visual-studio-code-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..9ad341dbf238 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/src/ +/pkg/ +*.tar.xz +*.tar.gz +/vscode/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d05d2a183b98 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: Michael Hansen <zrax0111 gmail com> + +pkgname=visual-studio-code-git +pkgdesc='Visual Studio Code for Linux, Open Source version from git' +pkgver=0.10.10.insiders.r334.g6580a4e +pkgrel=1 +arch=('i686' 'x86_64') +url='https://code.visualstudio.com/' +license=('MIT') +makedepends=('npm' 'gulp' 'python2') +depends=('gtk2' 'gconf') +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') +sha1sums=('SKIP' + 'a42e461ed586ef0fd31ff911ad662135f4f602aa' + 'ffe64521128379790749d7e61ba1eeeb7e732dec') + +case "$CARCH" in + i686) + _vscode_arch=ia32 + ;; + x86_64) + _vscode_arch=x64 + ;; + *) + # Needed for mksrcinfo + _vscode_arch=DUMMY + ;; +esac + +pkgver() { + cd "${srcdir}/vscode" + git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}/vscode" + + local _commit=$(cd "${srcdir}/vscode" && git rev-parse HEAD) + patch -p1 -i "${srcdir}/product_json.patch" + sed "s/@commit@/${_commit}/g" -i product.json +} + +build() { + cd "${srcdir}/vscode" + + ./scripts/npm.sh install + gulp vscode-linux-${_vscode_arch} +} + +package() { + install -m 0755 -d "${pkgdir}/opt/VSCode-OSS" + cp -r "${srcdir}/VSCode-linux-${_vscode_arch}"/* "${pkgdir}/opt/VSCode-OSS" + + # Include symlink in system bin directory + install -m 0755 -d "${pkgdir}/usr/bin" + ln -s '/opt/VSCode-OSS/code-oss' "${pkgdir}/usr/bin/${pkgname}" + + # Add .desktop file + install -D -m644 "${srcdir}/${pkgname}.desktop" \ + "${pkgdir}/usr/share/applications/${pkgname}.desktop" + + # Install license file + install -D -m644 "${srcdir}/VSCode-linux-${_vscode_arch}/resources/app/LICENSE.txt" \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} diff --git a/product_json.patch b/product_json.patch new file mode 100644 index 000000000000..98c3db97b3bd --- /dev/null +++ b/product_json.patch @@ -0,0 +1,29 @@ +diff -rupN a/product.json b/product.json +--- a/product.json 2016-03-09 09:32:26.286492275 -0800 ++++ b/product.json 2016-03-09 09:31:46.926493755 -0800 +@@ -1,10 +1,21 @@ + { + "nameShort": "Code - OSS", +- "nameLong": "Code - OSS", ++ "nameLong": "Visual Studio Code - OSS", + "applicationName": "code-oss", + "dataFolderName": ".vscode-oss", + "win32MutexName": "vscodeoss", + "licenseUrl": "https://github.com/Microsoft/vscode/blob/master/LICENSE.txt", + "darwinBundleIdentifier": "com.visualstudio.code.oss", +- "welcomePage": "http://go.microsoft.com/fwlink/?LinkId=723048" +-} +\ No newline at end of file ++ "welcomePage": "http://go.microsoft.com/fwlink/?LinkId=723048", ++ "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", ++ "twitterUrl": "http://go.microsoft.com/fwlink/?LinkID=533687", ++ "requestFeatureUrl": "http://go.microsoft.com/fwlink/?LinkID=533482", ++ "reportIssueUrl": "http://go.microsoft.com/fwlink/?LinkId=534872", ++ "privacyStatementUrl": "http://go.microsoft.com/fwlink/?LinkID=528096&clcid=0x409", ++ "commit": "@commit@" ++} diff --git a/visual-studio-code-git.desktop b/visual-studio-code-git.desktop new file mode 100644 index 000000000000..b49a8df1568c --- /dev/null +++ b/visual-studio-code-git.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Visual Studio Code (Open Source) +Exec="/opt/VSCode-OSS/code-oss" %F +Icon=/opt/VSCode-OSS/resources/app/resources/linux/code.png +Type=Application +Categories=Development; |