www-apps/code-server-bin: add 4.90.3

Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
This commit is contained in:
Leonardo Hernández Hernández
2024-07-10 00:04:22 -06:00
parent b777930e7e
commit 2292bf1457
2 changed files with 103 additions and 0 deletions

View File

@@ -2,3 +2,5 @@ DIST code-server-bin-4.18.0-amd64.tar.gz 96325604 BLAKE2B b227866908496cebb44dbe
DIST code-server-bin-4.18.0-arm64.tar.gz 96445800 BLAKE2B 4504f71005f090a5317990e5559f7806b5d8135c511c25d037f58d5fba154c8463c69bf174bb975b307907983f3b042350b035efe5962518124709e159e35da5 SHA512 357de541a23b2cec3a2ec66b6093e55f1cc7793544f84609b60f83395a78497a7b1471a566418c57f2411b3e895a6ffb859649a65d046784824be1fccac2520b
DIST code-server-bin-4.19.1-amd64.tar.gz 96311589 BLAKE2B 291b186bf926ea6ecc4d056e73ff6d29eba70f2b94fe47de547c81ed695f5725a12165588f38ce87c713a55d1270c4636dc8069262d7b2c9e607feadb2aa7153 SHA512 c5490953c2918927b124d51c74f10ab25a8e2fefea4ed96d403ec6590a1f516721e98a4c435632652f42fcb9cef68ce4590f6eb9ca2de7eac92d7e08e2f1c1d5
DIST code-server-bin-4.19.1-arm64.tar.gz 96427997 BLAKE2B 46a680f7a3aba81c75eab218a025fe2c8848420f9500224c668b5b1d1cbc571819631f2a01ebc28b3004c6e28757e0122689ef67b1162cc2db8e5369423cadbb SHA512 1005dbb02b56e0b6198f27a601e44af4218b76a26c0416f493c83b1f7442bf383c454754a2fb26724eba66600a047a2276a1cb4f1a31c9ddebec86d56788ab74
DIST code-server-bin-4.90.3-amd64.tar.gz 96315768 BLAKE2B 051739afc677d12b303102d2b057509fbebc1310f048e46cdbfce4de6a993e956e72106a75c34d1d7ec4f7abdd123bb526916ca37e0e81fead950620aed69796 SHA512 856315d9885d88868d65ea942c8f5af3587274ef598fe4f4177edc24ce6866eb7817bd80a565833dba570389136a91f887648145d93b529ff9350a7a391e9a8d
DIST code-server-bin-4.90.3-arm64.tar.gz 96292182 BLAKE2B d805b6832c9781d843a90ce7cd04ee906a65c397d4005d4038a8ee05b63d7fd2bdecc64e1ff8e1fcb1862219398ced9f0cfdf32e335348496fc0a88bfbec726a SHA512 1722408c487db74e8832aca28dbc8cf53b555e879bb8c896861530a4263abc34375d2c2ff226726090362a60377064dcbbbdc58a1c0ce39bbb0a336dde65671a

View File

@@ -0,0 +1,101 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PN="${PN/-bin/}"
MY_P="${MY_PN}-${PV}"
BASE_URI="https://github.com/coder/${MY_PN}/releases/download/v${PV}/${MY_P}-linux"
inherit systemd
DESCRIPTION="VS Code in the browser (binary version with unbundled node and ripgrep)"
HOMEPAGE="https://coder.com/"
SRC_URI="
amd64? ( ${BASE_URI}-amd64.tar.gz -> ${P}-amd64.tar.gz )
arm64? ( ${BASE_URI}-arm64.tar.gz -> ${P}-arm64.tar.gz )
"
S="${WORKDIR}/${MY_P}-linux-${ARCH}"
LICENSE="MIT ISC BSD Apache-2.0 BSD-2 PYTHON 0BSD LGPL-2.1+"
LICENSE+=" LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
RESTRICT="test"
RDEPEND="
app-crypt/libsecret
>=net-libs/nodejs-20.0.0[ssl]
sys-apps/ripgrep
virtual/krb5
"
PATCHES=( "${FILESDIR}/${PN}-node.patch" )
DOCS=( README.md ThirdPartyNotices.txt )
QA_PREBUILT="*"
# Relative
VSCODE_MODULES="lib/vscode/node_modules"
QA_PRESTRIPPED="
opt/${PN}/node_modules/@node-rs/argon2-linux-x64-musl/argon2.linux-x64-musl.node
opt/${PN}/${VSCODE_MODULES}/@parcel/watcher/prebuilds/linux-x64/node.napi.musl.node
opt/${PN}/${VSCODE_MODULES}/@parcel/watcher/prebuilds/linux-x64/node.napi.glibc.node
"
src_prepare() {
default
# We remove as much precompiled code as we can,
# node modules not written in JS cannot be removed
# thus "-bin".
# use system node
rm ./lib/node || die "Failed to remove bundled nodejs"
# remove bundled ripgrep binary
rm ./"${VSCODE_MODULES}"/@vscode/ripgrep/bin/rg \
|| die "Failed to remove bundled ripgrep"
# Only required at build time
find "${S}" -type l -name python3 -delete || die
# not needed
rm ./postinstall.sh || die
# For windows
rm -r ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/win32-x64 || die
if [[ $ELIBC != "musl" ]]; then
rm ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/linux-x64/node.napi.musl.node || die
elif [[ $ELIBC != "glibc" ]]; then
rm ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/linux-x64/node.napi.glibc.node || die
rm ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/darwin-x64/node.napi.glibc.node || die
rm ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/darwin-arm64/node.napi.glibc.node || die
fi
rm -r ./lib/vscode/extensions/node_modules/.bin || die
}
src_install() {
einstalldocs
insinto /opt/"${PN}"
doins -r .
fperms +x /opt/"${PN}"/bin/"${MY_PN}"
dosym -r /opt/"${PN}"/bin/"${MY_PN}" /opt/"${PN}"/bin/"${PN}"
dosym -r /opt/"${PN}"/bin/"${PN}" /usr/bin/"${PN}"
dosym -r /usr/bin/rg \
/opt/"${PN}"/"${VSCODE_MODULES}"/@vscode/ripgrep/bin/rg
systemd_douserunit "${FILESDIR}/${PN}".service
newinitd "${FILESDIR}/${PN}".rc "${PN}"
newconfd "${FILESDIR}/${PN}".conf "${PN}"
}
pkg_postinst() {
elog "When using code-server systemd service run it as a user"
elog "For example: 'systemctl --user enable --now code-server'"
}