diff options
author | Marcus Behrendt | 2021-08-08 11:39:10 +0200 |
---|---|---|
committer | Marcus Behrendt | 2021-08-08 11:39:10 +0200 |
commit | 6a11a5ca3d9aa563521ccf98b5e73f5408eb4164 (patch) | |
tree | a17e4e41e317950a7ad507ea4f79bcfc9a960b26 | |
download | aur-6a11a5ca3d9aa563521ccf98b5e73f5408eb4164.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 23 | ||||
-rwxr-xr-x | patch.sh | 17 | ||||
-rw-r--r-- | vscodium-marketplace.hook | 10 | ||||
-rw-r--r-- | vscodium-marketplace.install | 15 |
5 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b123e3253a6f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = vscodium-marketplace + pkgdesc = Enable vscode marketplace in vscodium + pkgver = 1.59.0 + pkgrel = 1 + url = https://marketplace.visualstudio.com/vscode + install = vscodium-marketplace.install + arch = any + license = unknown + depends = vscodium + depends = sed + source = vscodium-marketplace.hook + source = patch.sh + md5sums = c4b0dc2ddfb8788415344fc0e528c002 + md5sums = b93f0158ea7dd0880420a15ba135854c + +pkgname = vscodium-marketplace diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6aa0213bd859 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,23 @@ +# based on vscodium-marketplace +# Original Maintainer: Carson Rueter <roachh at proton mail dot com> +# Original Maintainer: Icelk <main at icelk.dev> +# Maintainer: Marcus Behrendt <marcus dot behrendt dot 86 at bigbrother(gmail) dot com> + +pkgname=vscodium-marketplace +pkgver=1.59.0 +pkgrel=1 +pkgdesc='Enable vscode marketplace in vscodium' +arch=('any') +url='https://marketplace.visualstudio.com/vscode' +license=('unknown') +depends=('vscodium' 'sed') +install="${pkgname}.install" +source=('vscodium-marketplace.hook' + 'patch.sh') +md5sums=('c4b0dc2ddfb8788415344fc0e528c002' + 'b93f0158ea7dd0880420a15ba135854c') +package() { + install -Dm 644 "${srcdir}"/vscodium-marketplace.hook "${pkgdir}"/usr/share/libalpm/hooks/vscodium-marketplace.hook + install -Dm 755 "${srcdir}"/patch.sh "${pkgdir}"/usr/share/vscodium/resources/app/patch.sh +} + diff --git a/patch.sh b/patch.sh new file mode 100755 index 000000000000..893a7163e4b7 --- /dev/null +++ b/patch.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env sh + +if [ "${1}" = "-R" ]; then + sed -i -e 's/^[[:blank:]]*"serviceUrl":.*/ "serviceUrl": "https:\/\/open-vsx.org\/vscode\/gallery",/' \ + -e '/^[[:blank:]]*"cacheUrl/d' \ + -e 's/^[[:blank:]]*"itemUrl":.*/ "itemUrl": "https:\/\/open-vsx.org\/vscode\/item"/' \ + -e '/^[[:blank:]]*"linkProtectionTrustedDomains/d' \ + -e '/^[[:blank:]]*"documentationUrl/i\ "linkProtectionTrustedDomains": ["https://open-vsx.org"],' \ + /usr/share/vscodium/resources/app/product.json +else + sed -i -e 's/^[[:blank:]]*"serviceUrl":.*/ "serviceUrl": "https:\/\/marketplace.visualstudio.com\/_apis\/public\/gallery",/' \ + -e '/^[[:blank:]]*"cacheUrl/d' \ + -e '/^[[:blank:]]*"serviceUrl/a\ "cacheUrl": "https:\/\/vscode.blob.core.windows.net\/gallery\/index",' \ + -e 's/^[[:blank:]]*"itemUrl":.*/ "itemUrl": "https:\/\/marketplace.visualstudio.com\/items"/' \ + -e '/^[[:blank:]]*"linkProtectionTrustedDomains/d' \ + /usr/share/vscodium/resources/app/product.json +fi diff --git a/vscodium-marketplace.hook b/vscodium-marketplace.hook new file mode 100644 index 000000000000..40e81070fe4f --- /dev/null +++ b/vscodium-marketplace.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = Package +Target = vscodium + +[Action] +Description = [vscodium-marketplace] Patching product.json... +Exec = /usr/share/vscodium/resources/app/patch.sh +When = PostTransaction diff --git a/vscodium-marketplace.install b/vscodium-marketplace.install new file mode 100644 index 000000000000..330dbe959600 --- /dev/null +++ b/vscodium-marketplace.install @@ -0,0 +1,15 @@ +post_install() { + /usr/share/vscodium/resources/app/patch.sh +} + +pre_upgrade() { + /usr/share/vscodium/resources/app/patch.sh -R +} + +post_upgrade() { + /usr/share/vscodium/resources/app/patch.sh +} + +pre_remove() { + /usr/share/vscodium/resources/app/patch.sh -R +} |