Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: codium-marketplace #1410

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions anda/devs/codium-marketplace/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "codium-marketplace.spec"
}
}
40 changes: 40 additions & 0 deletions anda/devs/codium-marketplace/codium-marketplace.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# ref: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vscodium-marketplace

Name: codium-marketplace
Version: 1.65.0
Release: 1%?dist
Summary: Enable vscode marketplace in vscodium
License: MIT
BuildArch: noarch
URL: https://marketplace.visualstudio.com/vscode
Requires: codium sed

%description
This package replaces the default marketplace (https://open-vsx.org/)
to the official one used by vscode.

%posttrans
if [ $1 -gt 1 ]; then # update/install
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/codium/resources/app/product.json || true
fi

%preun
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/codium/resources/app/product.json || true

%triggerin -- codium
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/codium/resources/app/product.json || true
Loading