File vmware-player-updater.spec of Package vmware-player-updater
#
# spec file for package vmware-player-updater
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: vmware-player-updater
Version: 17.5.0
Release: 0
Url: https://www.vmware.com/
Summary: Keep VMware Player up to date
Group: System/GUI/KDE
BuildRequires: desktop-file-utils
BuildRequires: update-desktop-files
BuildRequires: hicolor-icon-theme
BuildRequires: -post-build-checks
Requires: xz
Requires: kernel-default-devel >= 6.8.7.1
Requires: kernel-devel >= 6.8.7.1
Requires: kernel-macros >= 6.8.7.1
Requires: kernel-default >= 6.8.7.1
Requires: kernel-syms >= 6.8.7.1
Requires: dkms >= 2.6.1
Requires: gcc-c++
BuildArch: noarch
License: MIT
Source0: %{name}
Source2: %{name}.sh
Source3: %{name}.desktop.txt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package helps to keep the VMware Player application always up to date.
%check
%prep
%build
%install
mkdir -p %{buildroot}/usr/share/%{name}/
mkdir -p %{buildroot}/etc/profile.d/
install -Dm 755 %{SOURCE0} %{buildroot}/usr/share/%{name}/%{name}
cp -f %{SOURCE2} %{buildroot}/etc/profile.d/%{name}.sh
cp -f %{SOURCE3} %{buildroot}/usr/share/%{name}/%{name}.desktop
chmod +x %{buildroot}/etc/profile.d/%{name}.sh
%post
# Start update script
/usr/share/%{name}/%{name} start
echo please run vmware-player-updater to install
echo input /etc/systemd/system in System service scripts directory call
source /etc/profile.d/vmware-player-updater.sh
update-desktop-database
%preun
if [ "$1" = 0 ]; then
cd /usr/share/%{name}/
yes y | ./VMware-Player-%{version}-*.x86_64.bundle --uninstall-product=vmware-player
rm -rf "/usr/share/%{name}"
update-desktop-database
fi
%files
%defattr(-,root,root)
/usr/share/%{name}
/usr/share/%{name}/%{name}.desktop
%attr(0644, root, root) /etc/profile.d/%{name}.sh
%changelog