Files
vscode/resources/linux/rpm/code.spec.template
Daniel Imms 6e113d01f0 Move bin command to /usr/share/<app>/bin
/usr/bin/<app> now symlinks to the launcher. This makes the CLI
accessible in the zip archive version.

Fixes #4426
2016-04-04 16:25:12 -07:00

52 lines
1.6 KiB
Plaintext

Name: @@NAME@@
Version: @@VERSION@@
Release: @@RELEASE@@
Summary: Code editing. Redefined.
Group: Development/Tools
Vendor: Microsoft Corporation
Packager: Visual Studio Code Team <vscode-linux@microsoft.com>
License: MIT
URL: https://code.visualstudio.com/
Icon: @@NAME@@.xpm
Requires: git
AutoReq: 0
%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.
%install
mkdir -p %{buildroot}/usr/share/@@NAME@@
mkdir -p %{buildroot}/usr/share/applications
mkdir -p %{buildroot}/usr/share/pixmaps
cp -r usr/share/@@NAME@@/* %{buildroot}/usr/share/@@NAME@@
cp -r usr/share/applications/@@NAME@@.desktop %{buildroot}/usr/share/applications
cp -r usr/share/pixmaps/@@NAME@@.png %{buildroot}/usr/share/pixmaps
%post
# Remove the legacy bin command if this is the stable build
if [ "@@NAME@@" = "code" ]; then
rm -f /usr/local/bin/code
fi
# Symlink bin command to /usr/bin2
rm -f /usr/bin/@@NAME@@
ln -s /usr/share/@@NAME@@/bin/@@NAME@@ /usr/bin/@@NAME@@
# Register yum repository
# TODO: #229: Enable once the yum repository is signed
#if [ "@@NAME@@" != "code-oss" ]; then
# if [ -d "/etc/yum.repos.d" ]; then
# REPO_FILE=/etc/yum.repos.d/@@NAME@@.repo
# rm -f $REPO_FILE
# echo -e "[@@NAME@@]\nname=@@NAME_LONG@@\nbaseurl=@@UPDATEURL@@/api/rpm/@@QUALITY@@/@@ARCHITECTURE@@/rpm" > $REPO_FILE
# fi
#fi
%files
%defattr(-,root,root)
/usr/share/@@NAME@@/
/usr/share/@@NAME@@/bin/@@NAME@@
/usr/share/applications/@@NAME@@.desktop
/usr/share/pixmaps/@@NAME@@.png