Projects
Eulaceura:Factory
vscode
_service:obs_scm:vscode.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:vscode.spec of Package vscode
%define debug_package %{nil} Name: code Version: 1.93.1 Release: 2 License: MIT Group: Development/Tools Summary: Code editing. Redefined. Url: https://github.com/microsoft/vscode AutoReq: 0 %global __provides_exclude_from ^%{_datadir}/%{name}/.*\\.so.*$ Source0: vscode-%{version}_aa Source1: vscode-%{version}_ab Source2: vscode-%{version}_ac Source3: vscode-%{version}_ad Source4: %{name}.png Patch1: vscode-name.patch BuildRequires: python3 BuildRequires: git BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: npm BuildRequires: wget BuildRequires: pkg-config BuildRequires: libX11-devel BuildRequires: libxkbfile-devel BuildRequires: libsecret-devel BuildRequires: krb5-devel BuildRequires: nss BuildRequires: dbus-devel BuildRequires: atk-devel BuildRequires: at-spi2-atk-devel BuildRequires: cups-libs BuildRequires: pango BuildRequires: mesa-libgbm BuildRequires: alsa-lib BuildRequires: nodejs-devel BuildRequires: nodejs-yarn %description Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. %prep pushd %{_sourcedir} cat vscode-%{version}_a* > vscode-%{version}.tar.gz sha256sum -c checksum popd rm -rf vscode-%{version} mkdir -p vscode-%{version} pushd vscode-%{version} tar -xf %{_sourcedir}/vscode-%{version}.tar.gz --strip-components=1 pwd | xargs git config --global --add safe.directory git checkout %{version} %patch1 -p1 cp -r %{_sourcedir}/%{name}.png resources/linux/%{name}.png cp -r %{_sourcedir}/%{name}.png resources/server/%{name}-192.png cp -r %{_sourcedir}/%{name}.png resources/server/%{name}-512.png popd %build pushd vscode-%{version} npm config set registry https://repo.huaweicloud.com/repository/npm/ yarn config set registry https://repo.huaweicloud.com/repository/npm/ set +e for i in {1..10}; do yarn install --verbose --network-timeout 6000 if [ $? -eq 0 ]; then break fi done set -e npm run compile npm run electron bash ./scripts/code-cli.sh | true popd %install pushd vscode-%{version} mkdir -p %{buildroot}%{_datadir}/%{name} mkdir -p %{buildroot}%{_datadir}/%{name}/bin mkdir -p %{buildroot}%{_datadir}/applications mkdir -p %{buildroot}%{_datadir}/appdata mkdir -p %{buildroot}%{_datadir}/mime/packages mkdir -p %{buildroot}%{_datadir}/pixmaps install -Dm 0755 resources/linux/bin/%{name}.sh %{buildroot}%{_datadir}/%{name}/bin/%{name} sed -i "s/@@APPNAME@@/code/g" %{buildroot}%{_datadir}/%{name}/bin/%{name} sed -i "s/@@PRODNAME@@/Visual Studio Code/g" %{buildroot}%{_datadir}/%{name}/bin/%{name} sed -i "s/@@APPNAME@@/code/g" %{buildroot}%{_datadir}/%{name}/bin/%{name} sed -i "60s/code/code-oss/g" %{buildroot}%{_datadir}/%{name}/bin/%{name} sed -i "60iexport VSCODE_CLI=0" %{buildroot}%{_datadir}/%{name}/bin/%{name} sed -i "60iexport VSCODE_DEV=0" %{buildroot}%{_datadir}/%{name}/bin/%{name} cp -arf .build/electron/* %{buildroot}%{_datadir}/%{name}/ mkdir -p %{buildroot}%{_datadir}/%{name}/resources/app cp -arf extensions %{buildroot}%{_datadir}/%{name}/resources/app/ cp -arf node_modules %{buildroot}%{_datadir}/%{name}/resources/app/ cp -arf out %{buildroot}%{_datadir}/%{name}/resources/app/ cp -arf product.json %{buildroot}%{_datadir}/%{name}/resources/app/ cp -arf package.json %{buildroot}%{_datadir}/%{name}/resources/app/ cp -arf resources/completions %{buildroot}%{_datadir}/%{name}/resources/ sed -i "s/@@APPNAME@@/code/g" %{buildroot}%{_datadir}/%{name}/resources/completions/zsh/_%{name} sed -i "s/@@APPNAME@@/code/g" %{buildroot}%{_datadir}/%{name}/resources/completions/bash/%{name} # Support files cp -r resources/linux/%{name}.desktop %{buildroot}%{_datadir}/applications cp -r resources/linux/%{name}-url-handler.desktop %{buildroot}%{_datadir}/applications cp -r resources/linux/%{name}.appdata.xml %{buildroot}%{_datadir}/appdata cp -r resources/linux/%{name}-workspace.xml %{buildroot}%{_datadir}/mime/packages/%{name}-workspace.xml cp -r %{_sourcedir}/%{name}.png %{buildroot}%{_datadir}/pixmaps sed -i "s/@@NAME_LONG@@/Visual Studio Code/g" %{buildroot}%{_datadir}/applications/* sed -i "s/@@EXEC@@/\/usr\/share\/code\/bin\/code/g" %{buildroot}%{_datadir}/applications/* sed -i "s/@@ICON@@/code/g" %{buildroot}%{_datadir}/applications/* sed -i "s/@@URLPROTOCOL@@/vscode/g" %{buildroot}%{_datadir}/applications/* sed -i "s/@@NAME_SHORT@@/Code/g" %{buildroot}%{_datadir}/applications/* sed -i "s/@@NAME@@/code/g" %{buildroot}%{_datadir}/applications/* sed -i "s/@@LICENSE@@/Multiple, see https:\/\/code.visualstudio.com\/license/g" %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml sed -i "s/@@NAME_LONG@@/Visual Studio Code/g" %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml sed -i "s/@@NAME@@/Visual Studio Code/g" %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml sed -i "s/@@NAME_LONG@@/Visual Studio Code/g" %{buildroot}%{_datadir}/mime/packages/%{name}-workspace.xml sed -i "s/@@NAME@@/Visual Studio Code/g" %{buildroot}%{_datadir}/mime/packages/%{name}-workspace.xml popd if [ "$(arch)" == "x86_64" ]; then find %{buildroot}%{_datadir}/ -name *-arm64 | xargs rm -rf else find %{buildroot}%{_datadir}/ -name *-x64 | xargs rm -rf fi find %{buildroot}%{_datadir}/ -name yarn.lock | xargs rm -rf %files %{_datadir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/applications/%{name}-url-handler.desktop %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/mime/packages/%{name}-workspace.xml %{_datadir}/pixmaps/%{name}.png %post ln -s %{_datadir}/code/bin/code /usr/bin/code update-desktop-database update-mime-database %{_datadir}/mime %postun rm -rf /usr/bin/code update-desktop-database update-mime-database %{_datadir}/mime %changelog * Thu Oct 10 2024 wangkui <wangkui35@h-partner.com> - 1.93.1-2 - remove git clone * Wed Oct 9 2024 wangkui <wangkui35@h-partner.com> - 1.93.1-1 - init
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2