File rustdesk.spec of Package rustdesk-1.2.3

Name:       rustdesk
Version:    1.2.3
Release:    16.1
Summary:    RPM package
License:    GPL-3.0
Requires:   gtk3 libxcb1 xdotool libXfixes3 alsa-utils libXtst6 libayatana-appindicator3-1 libvdpau1 libva2 pam gstreamer-plugins-base gstreamer-plugin-pipewire wget xz desktop-file-utils update-desktop-files hicolor-icon-theme
Provides:   libdesktop_drop_plugin.so()(64bit), libdesktop_multi_window_plugin.so()(64bit), libfile_selector_linux_plugin.so()(64bit), libflutter_custom_cursor_plugin.so()(64bit), libflutter_linux_gtk.so()(64bit), libscreen_retriever_plugin.so()(64bit), libtray_manager_plugin.so()(64bit), liburl_launcher_linux_plugin.so()(64bit), libwindow_manager_plugin.so()(64bit), libwindow_size_plugin.so()(64bit), libtexture_rgba_renderer_plugin.so()(64bit)
Source0: rustdesk-1.2.3.tar.xz


%description
The best open-source remote desktop client software, written in Rust.

%prep
# we have no source, so nothing here

%build
# we have no source, so nothing here

%global __python %{__python3}


%install
mkdir -p %buildroot/opt/goupilmtos-base/
cp -f %{SOURCE0} %{buildroot}/opt/goupilmtos-base/rustdesk-1.2.3.tar.xz

%post
if test -e /opt/goupilmtos-base/rustdesk-1.2.3.tar.xz ; then
    tar xf /opt/goupilmtos-base/rustdesk-1.2.3.tar.xz -C /
fi


%files
%defattr(-,root,root)
/opt/goupilmtos-base/
/opt/goupilmtos-base/rustdesk-1.2.3.tar.xz



%changelog
# let's skip this for now

# https://www.cnblogs.com/xingmuxin/p/8990255.html
%pre
# can do something for centos7
case "$1" in
  1)
    # for install
  ;;
  2)
    # for upgrade
    systemctl stop rustdesk || true
  ;;
esac


%preun
case "$1" in
  0)
    # for uninstall
    systemctl stop rustdesk || true
    systemctl disable rustdesk || true
    rm /etc/systemd/system/rustdesk.service || true
  ;;
  1)
    # for upgrade
  ;;
esac

%postun
case "$1" in
  0)
    # for uninstall
    rm /usr/share/applications/rustdesk.desktop || true
    rm /usr/share/applications/rustdesk-link.desktop || true
    update-desktop-database
  ;;
  1)
    # for upgrade
  ;;
esac
openSUSE Build Service is sponsored by