blob: b6a4eb420b489254c8c0a366dec124113f013978 (
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
|
%global debug_package %{nil}
%define vscode_version 1.91.0
Name: vscodium
Version: %{vscode_version}.24190
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/%{version}.tar.gz
Source1: https://github.com/microsoft/vscode/archive/%{vscode_version}.tar.gz
Patch0: no-exec-git.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 yarnpkg git python3 jq
%description
VSCodium is a community-driven, freely-licensed binary distribution of Microsoft’s editor VS Code.
%prep
%setup -q
tar -xzf %{SOURCE1} -C %{_builddir}/%{name}-%{version}
mv %{_builddir}/%{name}-%{version}/vscode-%{vscode_version} %{_builddir}/%{name}-%{version}/vscode
%patch 0
%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"
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
|