2022-10-15 21:36:52 +03:00
|
|
|
%define _optdir /opt
|
|
|
|
%define debug %nil
|
|
|
|
%define debug_package %nil
|
2024-06-14 10:05:25 +00:00
|
|
|
%define msver 1.90.1
|
|
|
|
%define subrel 24165
|
2022-10-15 21:36:52 +03:00
|
|
|
|
|
|
|
Name: vscodium
|
2022-10-17 13:46:49 +03:00
|
|
|
Version: %{msver}.%{subrel}
|
2022-10-15 21:36:52 +03:00
|
|
|
Release: 1
|
|
|
|
Summary: VS Code without MS branding/telemetry/licensing
|
|
|
|
Group: Development/Tools
|
|
|
|
License: MIT
|
|
|
|
URL: https://vscodium.com
|
2024-06-14 10:05:25 +00:00
|
|
|
#Source0: https://github.com/VSCodium/vscodium/archive/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Source0: https://github.com/VSCodium/vscodium/releases/download/%{version}/VSCodium-%{version}-src.tar.gz
|
2022-10-15 21:36:52 +03:00
|
|
|
Source1: https://github.com/microsoft/vscode/archive/%{msver}/vscode-%{msver}.tar.gz
|
2023-06-17 04:58:48 +00:00
|
|
|
#Source2: remote-dependencies.tar
|
2022-10-15 21:36:52 +03:00
|
|
|
Source1000: %{name}.rpmlintrc
|
|
|
|
ExclusiveArch: x86_64
|
|
|
|
BuildRequires: nodejs-bootstrap-bin >= 16
|
|
|
|
BuildRequires: yarn
|
|
|
|
BuildRequires: jq
|
|
|
|
BuildRequires: pkgconfig(x11)
|
|
|
|
BuildRequires: pkgconfig(libsecret-1)
|
|
|
|
BuildRequires: pkgconfig(xkbfile)
|
|
|
|
BuildRequires: imagemagick
|
|
|
|
BuildRequires: git-core
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: sqlite-tools
|
|
|
|
BuildRequires: python38-devel
|
2023-06-09 08:13:30 +00:00
|
|
|
BuildRequires: clang
|
|
|
|
BuildRequires: llvm
|
2022-10-15 21:36:52 +03:00
|
|
|
|
|
|
|
%description
|
|
|
|
Visual Studio Code is a new choice of tool that
|
|
|
|
combines the simplicity of a code editor with
|
|
|
|
what developers need for the core edit-build-debug cycle.
|
|
|
|
|
|
|
|
%prep
|
2024-06-14 10:05:25 +00:00
|
|
|
%setup -q -c %{name}-%{version}
|
2022-10-15 21:36:52 +03:00
|
|
|
tar -xf %{SOURCE1}
|
|
|
|
mv vscode-%{msver} vscode
|
|
|
|
|
|
|
|
%build
|
2023-06-17 04:58:48 +00:00
|
|
|
#install -Dm0644 %{SOURCE2} remote-dependencies.tar
|
2023-06-09 08:13:30 +00:00
|
|
|
|
2023-09-07 19:42:38 +00:00
|
|
|
export PATH=/opt/nodejs/16.17.1/bin/:$PATH
|
2022-10-15 21:36:52 +03:00
|
|
|
export PYTHONPATH=%{python38_sitelib}
|
|
|
|
export PYTHON3=/usr/libexec/python3.8
|
|
|
|
export PYTHON=/usr/libexec/python3.8
|
|
|
|
|
|
|
|
yarn config set --home enableTelemetry 0
|
|
|
|
|
2024-06-12 12:09:28 +00:00
|
|
|
#sed -i -e '/get_repo.sh/d' -e '/vscode\*/d' build/build.sh
|
2022-10-15 21:36:52 +03:00
|
|
|
|
2024-06-12 12:09:28 +00:00
|
|
|
#git init
|
2022-10-15 21:36:52 +03:00
|
|
|
|
2024-06-12 12:09:28 +00:00
|
|
|
#pushd vscode
|
|
|
|
#git init
|
|
|
|
#popd
|
2022-10-15 21:36:52 +03:00
|
|
|
|
2024-06-12 12:09:28 +00:00
|
|
|
#export MS_TAG=%{msver} MS_COMMIT="" RELEASE_VERSION=%{version} BUILD_SOURCEVERSION=""
|
|
|
|
|
2024-06-14 10:05:25 +00:00
|
|
|
export VSCODE_NODE_GLIBC='-glibc-2.17'
|
2024-06-12 12:09:28 +00:00
|
|
|
export SHOULD_BUILD=yes
|
2022-10-15 21:36:52 +03:00
|
|
|
|
2024-06-14 10:05:25 +00:00
|
|
|
export VSCODE_SKIP_NODE_VERSION_CHECK=1
|
|
|
|
export VSCODE_SYSROOT_PREFIX='-glibc-2.17'
|
|
|
|
|
2023-06-09 08:13:30 +00:00
|
|
|
#export CC=clang
|
|
|
|
#export CXX=clang++
|
|
|
|
|
2024-06-14 10:05:25 +00:00
|
|
|
#./build.sh
|
|
|
|
./build/build.sh
|
2023-06-09 08:13:30 +00:00
|
|
|
|
|
|
|
#npm install tslib
|
|
|
|
#npm install postcss@^8.0.0
|
|
|
|
|
|
|
|
#npm rebuild @parcel/watcher
|
|
|
|
|
|
|
|
#rm package-lock.json
|
2024-06-12 12:09:28 +00:00
|
|
|
#npm update
|
|
|
|
|
|
|
|
#./build/build.sh
|
2023-06-09 08:13:30 +00:00
|
|
|
|
2022-10-15 21:36:52 +03:00
|
|
|
%install
|
|
|
|
install -d %{buildroot}%{_bindir} \
|
2023-04-01 11:10:26 +00:00
|
|
|
%{buildroot}%{_optdir}/%{name} \
|
|
|
|
%{buildroot}%{_datadir}/applications \
|
|
|
|
%{buildroot}%{_datadir}/pixmaps \
|
|
|
|
%{buildroot}%{_datadir}/bash-completion/completions \
|
|
|
|
%{buildroot}%{_iconsdir}
|
2022-10-15 21:36:52 +03:00
|
|
|
|
|
|
|
cp -a VSCode-linux-*/* %{buildroot}%{_optdir}/%{name}
|
|
|
|
|
|
|
|
# start script
|
|
|
|
cat > %{buildroot}%{_bindir}/%{name} << EOF
|
|
|
|
#!/bin/bash
|
|
|
|
cd /opt/%{name}/bin
|
|
|
|
./codium
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x %{buildroot}%{_bindir}/%{name}
|
|
|
|
|
|
|
|
# menu-entry
|
|
|
|
cat >> %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
|
|
|
|
[Desktop Entry]
|
|
|
|
Name=%{name}
|
|
|
|
Comment=Code Editing. Redefined.
|
|
|
|
GenericName=%{name}
|
|
|
|
Exec=%{name} --no-sandbox \% F
|
|
|
|
Icon=%{name}
|
|
|
|
Type=Application
|
|
|
|
StartupNotify=false
|
|
|
|
StartupWMClass=%{name}
|
|
|
|
Categories=Utility;TextEditor;Development;IDE;
|
|
|
|
MimeType=text/plain;inode/directory;
|
|
|
|
Actions=new-empty-window;
|
|
|
|
Keywords=vscode;
|
|
|
|
|
|
|
|
[Desktop Action new-empty-window]
|
|
|
|
Name=New Empty Window
|
|
|
|
Exec=%{name} --no-sandbox --new-window \% F
|
|
|
|
Icon=%{name}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# icons
|
|
|
|
pushd icons/stable
|
|
|
|
for x in 16 24 32 48 64 96 128 256 512; do
|
|
|
|
install -d %{buildroot}%{_iconsdir}/hicolor/${x}x${x}/apps/
|
2023-04-06 11:32:58 +00:00
|
|
|
convert -resize ${x}x${x} codium_cnl.svg %{buildroot}%{_iconsdir}/hicolor/${x}x${x}/apps/%{name}.png
|
2022-10-15 21:36:52 +03:00
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
# remove suid
|
|
|
|
chmod -s %{buildroot}/%{_optdir}/%{name}/chrome-sandbox
|
|
|
|
|
|
|
|
# fix permissions
|
|
|
|
find %{buildroot}%{_optdir} -perm 0666 -type f -exec chmod 0644 {} \;
|
|
|
|
|
|
|
|
# add completion
|
|
|
|
install -Dm0644 ./VSCode-linux-*/resources/completions/bash/codium %{buildroot}%{_datadir}/bash-completion/completions/codium
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md LICENSE DOCS.md docs
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_optdir}/%{name}
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
|
|
|
%{_iconsdir}/hicolor/*/apps/%{name}.png
|
|
|
|
%{_datadir}/bash-completion/completions/codium
|
|
|
|
|