%global debug_package %{nil} %define vscode_version 1.91.1 %define jsdebugcompanion_version 1.1.2 %define jsdebug_version 1.91.0 %define vscodejsprofiletable_version 1.0.9 Name: vscodium Version: %{vscode_version}.24193 Release: 1 Summary: Free/Libre Open Source Software Binaries of VS Code License: MIT URL: https://github.com/VSCodium/vscodium Source0: https://github.com/VSCodium/vscodium/archive/refs/tags/%{version}.tar.gz Source1: https://github.com/microsoft/vscode/archive/refs/tags/%{vscode_version}.tar.gz Source2: https://github.com/microsoft/vscode-js-debug-companion/releases/download/v%{jsdebugcompanion_version}/ms-vscode.js-debug-companion.%{jsdebugcompanion_version}.vsix Source3: https://github.com/microsoft/vscode-js-debug/releases/download/v%{jsdebug_version}/ms-vscode.js-debug.%{jsdebug_version}.vsix Source4: https://github.com/microsoft/vscode-js-profile-visualizer/releases/download/v%{vscodejsprofiletable_version}/ms-vscode.vscode-js-profile-table.%{vscodejsprofiletable_version}.vsix Source5: vendor.tar Patch0: no-exec-git.patch Patch1: use-local-vsix.patch Patch2: yarn-offline.patch Patch3: ripgrep.patch Requires: glibc nodejs fontconfig libXtst cairo alsa-lib nss libnotify libxcb libxkbfile libsecret BuildRequires: gcc g++ make pkg-config libxcb-devel libxkbfile-devel krb5-devel libsecret-devel nodejs-yarn git python3 jq nodejs-devel %description VSCodium is a community-driven, freely-licensed binary distribution of Microsoft’s editor VS Code. %prep %setup -q tar -xvf %{SOURCE1} -C %{_builddir}/%{name}-%{version} mv %{_builddir}/%{name}-%{version}/vscode-%{vscode_version} %{_builddir}/%{name}-%{version}/vscode cp %{SOURCE2} %{_builddir}/%{name}-%{version} cp %{SOURCE3} %{_builddir}/%{name}-%{version} cp %{SOURCE4} %{_builddir}/%{name}-%{version} %patch 0 %patch 1 %patch 2 %patch 3 mkdir -p %{_builddir}/%{name}-%{version}/vendor tar -xvf %{SOURCE5} -C %{_builddir}/%{name}-%{version}/vendor yarn config set yarn-offline-mirror %{_builddir}/%{name}-%{version}/vendor echo "yarn-offline-mirror %{_builddir}/%{name}-%{version}/vendor" >> %{_builddir}/%{name}-%{version}/vscode/.yarnrc %build export APP_NAME="VSCodium" export BINARY_NAME="codium" export CI_BUILD="no" export SHOULD_BUILD="yes" export SKIP_ASSETS="yes" export SKIP_BUILD="no" export SKIP_SOURCE="yes" export VSCODE_LATEST="no" export VSCODE_QUALITY="stable" export VSCODE_SKIP_NODE_VERSION_CHECK="yes" export SHOULD_BUILD_REH="no" export OS_NAME="linux" export ELECTRON_MIRROR="https://mirrors.huaweicloud.com/electron/" UNAME_ARCH=$( uname -m ) if [[ "${UNAME_ARCH}" == "arm64" ]]; then export VSCODE_ARCH="arm64" elif [[ "${UNAME_ARCH}" == "ppc64le" ]]; then export VSCODE_ARCH="ppc64le" elif [[ "${UNAME_ARCH}" == "riscv64" ]]; then export VSCODE_ARCH="riscv64" else export VSCODE_ARCH="x64" fi export NODE_OPTIONS="--max-old-space-size=8192" ./build.sh %install install -dvm755 %{buildroot}%{_bindir} install -dvm755 %{buildroot}%{_datadir}/%{name} install -dvm755 %{buildroot}%{_datadir}/pixmaps cp -rv ./VSCode-linux-*/* %{buildroot}%{_datadir}/%{name} ln -sfv %{_datadir}/%{name}/bin/codium %{buildroot}%{_bindir}/codium ln -sfv %{_datadir}/%{name}/bin/codium %{buildroot}%{_bindir}/vscodium install -Dvm644 ./VSCode-linux-*/resources/app/resources/linux/code.png %{buildroot}%{_datadir}/pixmaps/vscodium.png %files %doc README.md %license LICENSE %{_datadir}/%{name} %{_bindir}/codium %{_bindir}/vscodium %{_datadir}/pixmaps/vscodium.png