From c63b7fa4cf396f2513e15dd3a8940aeb54363ea6 Mon Sep 17 00:00:00 2001 From: Nick Richards Date: Mon, 13 Nov 2017 16:47:58 +0000 Subject: [PATCH] Initial commit for VS Code --- com.visualstudio.code.json | 125 +++++++++++++++++++++++++++++++++++++ flathub.json | 3 + 2 files changed, 128 insertions(+) create mode 100644 com.visualstudio.code.json create mode 100644 flathub.json diff --git a/com.visualstudio.code.json b/com.visualstudio.code.json new file mode 100644 index 0000000..dfe4dc4 --- /dev/null +++ b/com.visualstudio.code.json @@ -0,0 +1,125 @@ +{ + "app-id": "com.visualstudio.code", + "branch": "stable", + "base": "io.atom.electron.BaseApp", + "base-version": "stable", + "runtime": "org.freedesktop.Sdk", + "runtime-version": "1.6", + "sdk": "org.freedesktop.Sdk", + "command": "code", + "tags": ["proprietary"], + "separate-locales": false, + "finish-args": [ + "--share=ipc", "--socket=x11", + "--socket=pulseaudio", + "--share=network", + "--device=dri", + "--filesystem=host", + "--talk-name=org.freedesktop.Notifications", + "--talk-name=org.freedesktop.secrets", + "--extra-data=code.deb:57b5f003d7dc13d3555e5b62d7e14a3e9cef7d759e5d2df2432a28d526f38db6:43469528::https://go.microsoft.com/fwlink/?LinkID=760868" + ], + "modules": [ + { + "name": "libsecret", + "config-opts": [ + "--disable-manpages", + "--disable-gtk-doc", + "--disable-static", + "--disable-introspection" + ], + "cleanup": [ + "/bin", + "/include", + "/lib/pkgconfig", + "/share/gtk-doc", + "*.la" + ], + "sources": [ + { + "type": "archive", + "url": "http://ftp.gnome.org/pub/GNOME/sources/libsecret/0.18/libsecret-0.18.5.tar.xz", + "sha256": "9ce7bd8dd5831f2786c935d82638ac428fa085057cc6780aba0e39375887ccb3" + }, + { + "type": "shell", + "commands": ["autoreconf -f"] + } + ] + }, + { + "name": "xkbfile", + "cleanup": ["/include", "/lib/*.la", "/lib/pkgconfig"], + "config-opts": ["--disable-static"], + "sources": [ + { + "type": "archive", + "url": "https://www.x.org/releases/individual/lib/libxkbfile-1.0.9.tar.bz2", + "sha256": "51817e0530961975d9513b773960b4edd275f7d5c72293d5a151ed4f42aeb16a" + } + ] + }, + { + "name": "git", + "make-args": ["NO_PERL=1"], + "make-install-args": ["NO_PERL=1"], + "sources": [ + { + "type": "archive", + "url": "https://www.kernel.org/pub/software/scm/git/git-2.14.1.tar.xz", + "sha256": "6f724c6d0e9e13114ab35db6f67e1b2c1934b641e89366e6a0e37618231f2cc6" + } + ] + }, + { + "name": "nodejs", + "sources": [ + { + "type": "archive", + "url": "https://nodejs.org/dist/v7.9.0/node-v7.9.0.tar.xz", + "sha256": "a569764b884929f31a0772600a5cf36048ad42aa8c54ba4cabea6c067ef96a29" + } + ] + }, + { + "name": "vscode", + "buildsystem": "simple", + "build-commands": [ + "install apply_extra /app/bin", + "install code.sh /app/bin/code", + "cp /usr/bin/ar /app/bin" + ], + "cleanup": [ + "/share/lintian", + "/share/pixmaps" + ], + "sources": [ + { + "type": "script", + "dest-filename": "apply_extra", + "commands": [ + "ar x code.deb", + "rm -f code.deb", + "tar -xf data.tar.xz", + "rm -f control.tar.gz data.tar.gz debian-binary", + "mv usr/* .", + "rmdir usr", + "mkdir -p export/share/icons/hicolor/512x512/apps", + "cp share/pixmaps/code.png export/share/icons/hicolor/512x512/apps/com.visualstudio.code.png", + "mkdir -p export/share/applications", + "cp share/applications/code.desktop export/share/applications/com.visualstudio.code.desktop", + "desktop-file-edit --set-key=Exec --set-value='code %F' export/share/applications/com.visualstudio.code.desktop", + "desktop-file-edit --set-key=Icon --set-value='com.visualstudio.code' export/share/applications/com.visualstudio.code.desktop", + "mkdir -p export/share/appdata", + "sed s/code.desktop/com.visualstudio.code.desktop/ share/appdata/code.appdata.xml > export/share/appdata/com.visualstudio.code.appdata.xml" + ] + }, + { + "type": "script", + "commands": ["/app/extra/share/code/code"], + "dest-filename": "code.sh" + } + ] + } + ] +} diff --git a/flathub.json b/flathub.json new file mode 100644 index 0000000..637604e --- /dev/null +++ b/flathub.json @@ -0,0 +1,3 @@ +{ + "only-arches": ["x86_64"] +}