mirror of https://github.com/built-aur/packages
addpkg: codium-marketplace
This commit is contained in:
parent
8319d9020f
commit
1485965e90
|
@ -0,0 +1,19 @@
|
|||
# Maintainer: MedzikUser <nivua1fn@duck.com>
|
||||
pkgname='codium-marketplace'
|
||||
pkgver='1.67.2'
|
||||
pkgrel=1
|
||||
pkgdesc="Enable VSCode marketplace in VSCodium"
|
||||
arch=('any')
|
||||
url="https://marketplace.visualstudio.com/vscode"
|
||||
license=('unknown')
|
||||
depends=('codium' 'sed')
|
||||
install="${pkgname}.install"
|
||||
source=("${pkgname}.hook"
|
||||
"patch.sh")
|
||||
sha256sums=('27d22c328efdc738f9d4c1290939bc8199c0f233ccb8cf1da61cc4e31df64227'
|
||||
'55166485967ec40be101d35b1582c70b6a1d565e9fa47cdc697c6ecef1dbb7e5')
|
||||
|
||||
package() {
|
||||
install -Dm 755 "patch.sh" "${pkgdir}/usr/share/${pkgname}/patch.sh"
|
||||
install -Dm 644 "${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks/${pkgname}.hook"
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
[Trigger]
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = codium
|
||||
|
||||
[Action]
|
||||
Description = [codium-marketplace] Patching product.json...
|
||||
Exec = /usr/share/codium-marketplace/patch.sh
|
||||
When = PostTransaction
|
|
@ -0,0 +1,15 @@
|
|||
post_install() {
|
||||
/usr/share/codium-marketplace/patch.sh
|
||||
}
|
||||
|
||||
pre_upgrade() {
|
||||
/usr/share/codium-marketplace/patch.sh -R
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
/usr/share/codium-marketplace/patch.sh
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
/usr/share/codium-marketplace/patch.sh -R
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
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/lib/codium/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/lib/codium/product.json
|
||||
fi
|
Loading…
Reference in New Issue