blob: 6e374c7ffac8b3ce1f9e7c523a99d4422d75664f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
%global debug_package %{nil}
%define vscode_version 1.92.2
%define jsdebugcompanion_version 1.1.3
%define jsdebug_version 1.92.0
%define vscodejsprofiletable_version 1.0.9
%define nodeheaders_version 20.14.0
%define electronnodeheaders_version 30.1.2
Name: vscodium
Version: %{vscode_version}.24228
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: https://nodejs.org/dist/v%{nodeheaders_version}/node-v%{nodeheaders_version}-headers.tar.gz
Source6: https://electronjs.org/headers/v%{electronnodeheaders_version}/node-v%{electronnodeheaders_version}-headers.tar.gz
Source7: 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 npm 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 ~/.cache/node-gyp/%{nodeheaders_version}
tar -xvf %{SOURCE5} -C ~/.cache/node-gyp/%{nodeheaders_version}
mv ~/.cache/node-gyp/%{nodeheaders_version}/node-v%{nodeheaders_version}/* ~/.cache/node-gyp/%{nodeheaders_version}
echo 11 > ~/.cache/node-gyp/%{nodeheaders_version}/installVersion
mkdir -p ~/.cache/node-gyp/%{electronnodeheaders_version}
tar -xvf %{SOURCE6} -C ~/.cache/node-gyp/%{electronnodeheaders_version}
mv ~/.cache/node-gyp/%{electronnodeheaders_version}/node_headers/* ~/.cache/node-gyp/%{electronnodeheaders_version}
echo 11 > ~/.cache/node-gyp/%{electronnodeheaders_version}/installVersion
mkdir -p %{_builddir}/%{name}-%{version}/vendor
tar -xvf %{SOURCE7} -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/"
export NODE_OPTIONS="--max-old-space-size=8192"
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
./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
|