summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSainnhepark2020-10-28 21:55:58 +0800
committerSainnhepark2020-10-28 21:55:58 +0800
commitf8cd96cfb05b48ce0bdd0d8dc3a66c7086f3038f (patch)
treef1e41039139afb13148ff26999f34d3a415abdff
downloadaur-f8cd96cfb05b48ce0bdd0d8dc3a66c7086f3038f.tar.gz
init
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD19
-rw-r--r--code-marketplace.hook10
-rw-r--r--code-marketplace.install15
-rw-r--r--product_json.patch23
5 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ca206263d8dd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = code-marketplace
+ pkgdesc = Enable vscode marketplace in Code OSS
+ pkgver = 1.50.1
+ pkgrel = 1
+ url = https://github.com/microsoft/vscode
+ install = code-marketplace.install
+ arch = any
+ license = unknown
+ depends = code
+ source = code-marketplace.hook
+ source = product_json.patch
+ md5sums = a55c25aba17a6bf3f6e1327c853e8b35
+ md5sums = 9e476c8aae4243010d6a1c18e56ac402
+
+pkgname = code-marketplace
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fad605c5bf2c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Sainnhe Park <sainnhe@gmail.com>
+pkgname=code-marketplace
+pkgver=1.50.1
+pkgrel=1
+pkgdesc='Enable vscode marketplace in Code OSS'
+arch=('any')
+url='https://github.com/microsoft/vscode'
+license=('unknown')
+depends=('code')
+install="${pkgname}.install"
+source=('code-marketplace.hook'
+ 'product_json.patch')
+md5sums=('a55c25aba17a6bf3f6e1327c853e8b35'
+ '9e476c8aae4243010d6a1c18e56ac402')
+
+package() {
+ install -Dm 644 "${srcdir}"/code-marketplace.hook "${pkgdir}"/usr/share/libalpm/hooks/code-marketplace.hook
+ install -Dm 644 "${srcdir}"/product_json.patch "${pkgdir}"/usr/lib/code/product_json.patch
+}
diff --git a/code-marketplace.hook b/code-marketplace.hook
new file mode 100644
index 000000000000..ca596c200585
--- /dev/null
+++ b/code-marketplace.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = Path
+Target = usr/lib/code/product.json
+
+[Action]
+Description = Modifying product.json...
+Exec = /usr/bin/bash -c "/usr/bin/patch /usr/lib/code/product.json < /usr/lib/code/product_json.patch"
+When = PostTransaction
diff --git a/code-marketplace.install b/code-marketplace.install
new file mode 100644
index 000000000000..7cf2ebcd3c35
--- /dev/null
+++ b/code-marketplace.install
@@ -0,0 +1,15 @@
+post_install() {
+ patch /usr/lib/code/product.json < /usr/lib/code/product_json.patch
+}
+
+pre_upgrade() {
+ patch -R /usr/lib/code/product.json < /usr/lib/code/product_json.patch
+}
+
+post_upgrade() {
+ patch /usr/lib/code/product.json < /usr/lib/code/product_json.patch
+}
+
+pre_remove() {
+ patch -R /usr/lib/code/product.json < /usr/lib/code/product_json.patch
+}
diff --git a/product_json.patch b/product_json.patch
new file mode 100644
index 000000000000..ff3b8ec1854e
--- /dev/null
+++ b/product_json.patch
@@ -0,0 +1,23 @@
+--- product.json 2020-10-15 18:25:40.000000000 +0800
++++ /usr/lib/code/product.json 2020-10-28 21:19:42.844503712 +0800
+@@ -1,10 +1,10 @@
+ {
+ "quality": "stable",
+ "extensionsGallery": {
+- "serviceUrl": "https://open-vsx.org/vscode/gallery",
+- "itemUrl": "https://open-vsx.org/vscode/item"
++ "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
++ "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
++ "itemUrl": "https://marketplace.visualstudio.com/items"
+ },
+- "linkProtectionTrustedDomains": ["https://open-vsx.org"],
+ "documentationUrl": "https://code.visualstudio.com/docs",
+ "requestFeatureUrl": "https://github.com/Microsoft/vscode/issues",
+ "introductoryVideosUrl": "https://go.microsoft.com/fwlink/?linkid=832146",
+@@ -144,4 +144,4 @@
+ "vs/code/electron-browser/workbench/workbench.html": "DCAx76TE79oJvbVEouBCXQ",
+ "vs/code/electron-browser/workbench/workbench.js": "EWRP4AdsNbp965Vz0YEmAA"
+ }
+-}
+\ No newline at end of file
++}