2023-08-01 00:36:19 +02:00
Name : rustdesk
2024-08-24 19:02:04 +08:00
Version : 1.3.1
2022-11-08 10:42:07 +08:00
Release : 0
Summary : RPM package
License : GPL-3.0
2023-05-04 17:24:58 +08:00
Requires : gtk3 libxcb libxdo libXfixes alsa-lib libappindicator-gtk3 libvdpau libva pam gstreamer1-plugins-base
2023-11-12 06:59:20 +02:00
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)
2022-11-08 10:42:07 +08:00
%description
2023-08-01 00:36:19 +02:00
The best open-source remote desktop client software, written in Rust.
2022-11-08 10:42:07 +08:00
%prep
# we have no source, so nothing here
%build
# we have no source, so nothing here
# %global __python %{__python3}
%install
2022-11-17 11:16:27 +08:00
mkdir -p " %{buildroot} / u s r / l i b / r u s t d e s k " && cp -r ${HBB}/flutter/build/linux/x64/release/bundle/* -t " %{buildroot} / u s r / l i b / r u s t d e s k "
mkdir -p " %{buildroot} / u s r / b i n "
install -Dm 644 $HBB/res/rustdesk.service -t " %{buildroot} / u s r / s h a r e / r u s t d e s k / f i l e s "
install -Dm 644 $HBB/res/rustdesk.desktop -t " %{buildroot} / u s r / s h a r e / r u s t d e s k / f i l e s "
install -Dm 644 $HBB/res/rustdesk-link.desktop -t " %{buildroot} / u s r / s h a r e / r u s t d e s k / f i l e s "
2023-08-01 00:36:19 +02:00
install -Dm 644 $HBB/res/128x128@2x.png " %{buildroot} / u s r / s h a r e / i c o n s / h i c o l o r / 2 5 6 x 2 5 6 / a p p s / r u s t d e s k . p n g "
2023-08-01 00:54:21 +02:00
install -Dm 644 $HBB/res/scalable.svg " %{buildroot} / u s r / s h a r e / i c o n s / h i c o l o r / s c a l a b l e / a p p s / r u s t d e s k . s v g "
2022-11-08 10:42:07 +08:00
%files
/usr/lib/rustdesk/*
/usr/share/rustdesk/files/rustdesk.service
2023-08-01 00:36:19 +02:00
/usr/share/icons/hicolor/256x256/apps/rustdesk.png
2023-08-01 00:54:21 +02:00
/usr/share/icons/hicolor/scalable/apps/rustdesk.svg
2022-11-08 10:42:07 +08:00
/usr/share/rustdesk/files/rustdesk.desktop
/usr/share/rustdesk/files/rustdesk-link.desktop
%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
%post
cp /usr/share/rustdesk/files/rustdesk.service /etc/systemd/system/rustdesk.service
cp /usr/share/rustdesk/files/rustdesk.desktop /usr/share/applications/
cp /usr/share/rustdesk/files/rustdesk-link.desktop /usr/share/applications/
2023-08-01 00:36:19 +02:00
ln -s /usr/lib/rustdesk/rustdesk /usr/bin/rustdesk
2022-11-08 10:42:07 +08:00
systemctl daemon-reload
systemctl enable rustdesk
systemctl start rustdesk
update-desktop-database
%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
2022-11-17 11:16:27 +08:00
rm /usr/bin/rustdesk || true
2022-11-08 10:42:07 +08:00
update-desktop-database
;;
1)
# for upgrade
;;
esac