Files
azuredatastudio/resources/linux/rpm/code.spec.template
Karl Burtram 6ad0df0e3e Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code

* Fix additional headers

* Fix a typo in launch.json
2017-12-15 15:38:57 -08:00

55 lines
1.6 KiB
Plaintext

Name: @@NAME@@
Version: @@VERSION@@
Release: @@RELEASE@@.el7
Summary: SQL Operations Studio
Group: Development/Tools
Vendor: Microsoft Corporation
Packager: Microsoft Corporation
License: @@LICENSE@@
URL: https://github.com/microsoft/sqlopsstudio
Icon: @@NAME@@.xpm
Requires: @@DEPENDENCIES@@
AutoReq: 0
%description
SQL Operations Studio is a data management tool that enables you to work with SQL Server, Azure SQL DB, and SQL DW from Linux. See https://docs.microsoft.com/en-us/sql/sql-operations-studio/what-is for documentation.
%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/bin
ln -sf /usr/share/@@NAME@@/bin/@@NAME@@ %{_bindir}/@@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
%postun
if [ $1 = 0 ]; then
rm -f /usr/bin/@@NAME@@
fi
%files
%defattr(-,root,root)
/usr/share/@@NAME@@/
/usr/share/applications/@@NAME@@.desktop
/usr/share/pixmaps/@@NAME@@.png