mirror of
https://abf.rosa.ru/djam/vscodium.git
synced 2025-02-23 06:12:58 +00:00
Imported from SRPM
This commit is contained in:
commit
cfaaa4acc0
3 changed files with 137 additions and 0 deletions
3
.abf.yml
Normal file
3
.abf.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
sources:
|
||||||
|
vscode-1.72.2.tar.gz: ec4fd95bc7c8e24a4114d1c000ae12fcd095e56b
|
||||||
|
vscodium-1.72.2.22286.tar.gz: 3c5c158b8df8a61963e7c1b2a1c029007edccc1b
|
10
vscodium.rpmlintrc
Normal file
10
vscodium.rpmlintrc
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
addFilter("E: dir-or-file-in-opt")
|
||||||
|
addFilter("W: hidden-file-or-dir")
|
||||||
|
addFilter("E: zero-length")
|
||||||
|
addFilter("W: script-without-shebang")
|
||||||
|
addFilter("E: non-standard-executable-perm")
|
||||||
|
addFilter("E: wrong-script-interpreter")
|
||||||
|
addFilter("W: non-executable-script")
|
||||||
|
addFilter("W: pem-certificate")
|
||||||
|
addFilter("E: shared-lib-without-dependency-information")
|
||||||
|
|
124
vscodium.spec
Normal file
124
vscodium.spec
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
%define _optdir /opt
|
||||||
|
%define debug %nil
|
||||||
|
%define debug_package %nil
|
||||||
|
%define msver 1.72.2
|
||||||
|
|
||||||
|
Name: vscodium
|
||||||
|
Version: %{msver}.22286
|
||||||
|
Release: 1
|
||||||
|
Summary: VS Code without MS branding/telemetry/licensing
|
||||||
|
Group: Development/Tools
|
||||||
|
License: MIT
|
||||||
|
URL: https://vscodium.com
|
||||||
|
Source0: https://github.com/VSCodium/vscodium/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Source1: https://github.com/microsoft/vscode/archive/%{msver}/vscode-%{msver}.tar.gz
|
||||||
|
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
|
||||||
|
|
||||||
|
%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
|
||||||
|
%setup -q
|
||||||
|
tar -xf %{SOURCE1}
|
||||||
|
mv vscode-%{msver} vscode
|
||||||
|
|
||||||
|
%build
|
||||||
|
export PATH=$PATH:/opt/nodejs/16.*/bin
|
||||||
|
export PYTHONPATH=%{python38_sitelib}
|
||||||
|
export PYTHON3=/usr/libexec/python3.8
|
||||||
|
export PYTHON=/usr/libexec/python3.8
|
||||||
|
|
||||||
|
yarn config set --home enableTelemetry 0
|
||||||
|
|
||||||
|
sed -i -e '/get_repo.sh/d' -e '/vscode\*/d' build/build.sh
|
||||||
|
|
||||||
|
git init
|
||||||
|
|
||||||
|
pushd vscode
|
||||||
|
git init
|
||||||
|
popd
|
||||||
|
|
||||||
|
export MS_TAG=%{msver} MS_COMMIT="" RELEASE_VERSION=%{version} BUILD_SOURCEVERSION=""
|
||||||
|
|
||||||
|
./build/build.sh
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d %{buildroot}%{_bindir} \
|
||||||
|
%{buildroot}%{_optdir}/%{name} \
|
||||||
|
%{buildroot}%{_datadir}/applications \
|
||||||
|
%{buildroot}%{_datadir}/pixmaps \
|
||||||
|
%{buildroot}%{_datadir}/bash-completion/completions \
|
||||||
|
%{buildroot}%{_iconsdir}
|
||||||
|
|
||||||
|
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/
|
||||||
|
convert -resize ${x}x${x} codium_only.svg %{buildroot}%{_iconsdir}/hicolor/${x}x${x}/apps/%{name}.png
|
||||||
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue