2023-08-01 06:36:19 +08:00
|
|
|
Name: rustdesk
|
2024-08-24 19:02:04 +08:00
|
|
|
Version: 1.3.1
|
2022-05-23 11:59:56 +08:00
|
|
|
Release: 0
|
|
|
|
Summary: RPM package
|
|
|
|
License: GPL-3.0
|
2024-09-15 14:33:59 +08:00
|
|
|
Requires: gtk3 libxcb libxdo libXfixes alsa-lib libvdpau1 libva2 pam gstreamer1-plugins-base
|
|
|
|
Recommends: libayatana-appindicator-gtk3
|
2022-05-23 11:59:56 +08:00
|
|
|
|
|
|
|
%description
|
2023-08-01 06:36:19 +08:00
|
|
|
The best open-source remote desktop client software, written in Rust.
|
2022-05-23 11:59:56 +08:00
|
|
|
|
|
|
|
%prep
|
|
|
|
# we have no source, so nothing here
|
|
|
|
|
|
|
|
%build
|
|
|
|
# we have no source, so nothing here
|
|
|
|
|
|
|
|
%global __python %{__python3}
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}/usr/bin/
|
|
|
|
mkdir -p %{buildroot}/usr/lib/rustdesk/
|
|
|
|
mkdir -p %{buildroot}/usr/share/rustdesk/files/
|
2023-08-02 01:33:06 +08:00
|
|
|
mkdir -p %{buildroot}/usr/share/icons/hicolor/256x256/apps/
|
|
|
|
mkdir -p %{buildroot}/usr/share/icons/hicolor/scalable/apps/
|
2022-05-23 11:59:56 +08:00
|
|
|
install -m 755 $HBB/target/release/rustdesk %{buildroot}/usr/bin/rustdesk
|
|
|
|
install $HBB/libsciter-gtk.so %{buildroot}/usr/lib/rustdesk/libsciter-gtk.so
|
2022-09-18 11:50:23 +08:00
|
|
|
install $HBB/res/rustdesk.service %{buildroot}/usr/share/rustdesk/files/
|
2023-08-01 06:36:19 +08:00
|
|
|
install $HBB/res/128x128@2x.png %{buildroot}/usr/share/icons/hicolor/256x256/apps/rustdesk.png
|
2023-08-01 06:54:21 +08:00
|
|
|
install $HBB/res/scalable.svg %{buildroot}/usr/share/icons/hicolor/scalable/apps/rustdesk.svg
|
2022-09-18 11:50:23 +08:00
|
|
|
install $HBB/res/rustdesk.desktop %{buildroot}/usr/share/rustdesk/files/
|
2022-10-11 19:52:03 +08:00
|
|
|
install $HBB/res/rustdesk-link.desktop %{buildroot}/usr/share/rustdesk/files/
|
2022-05-23 11:59:56 +08:00
|
|
|
|
|
|
|
%files
|
|
|
|
/usr/bin/rustdesk
|
|
|
|
/usr/lib/rustdesk/libsciter-gtk.so
|
|
|
|
/usr/share/rustdesk/files/rustdesk.service
|
2023-08-01 06:36:19 +08:00
|
|
|
/usr/share/icons/hicolor/256x256/apps/rustdesk.png
|
2023-08-01 06:54:21 +08:00
|
|
|
/usr/share/icons/hicolor/scalable/apps/rustdesk.svg
|
2022-05-23 11:59:56 +08:00
|
|
|
/usr/share/rustdesk/files/rustdesk.desktop
|
2022-10-11 19:52:03 +08:00
|
|
|
/usr/share/rustdesk/files/rustdesk-link.desktop
|
2022-05-23 11:59:56 +08:00
|
|
|
/usr/share/rustdesk/files/__pycache__/*
|
|
|
|
|
|
|
|
%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
|
2022-07-04 10:11:40 +08:00
|
|
|
systemctl stop rustdesk || true
|
2022-05-23 11:59:56 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
%post
|
|
|
|
cp /usr/share/rustdesk/files/rustdesk.service /etc/systemd/system/rustdesk.service
|
|
|
|
cp /usr/share/rustdesk/files/rustdesk.desktop /usr/share/applications/
|
2022-10-11 19:52:03 +08:00
|
|
|
cp /usr/share/rustdesk/files/rustdesk-link.desktop /usr/share/applications/
|
2022-05-23 11:59:56 +08:00
|
|
|
systemctl daemon-reload
|
|
|
|
systemctl enable rustdesk
|
|
|
|
systemctl start rustdesk
|
|
|
|
update-desktop-database
|
|
|
|
|
|
|
|
%preun
|
2022-07-04 10:11:40 +08:00
|
|
|
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
|
2022-05-23 11:59:56 +08:00
|
|
|
|
|
|
|
%postun
|
2022-07-04 10:11:40 +08:00
|
|
|
case "$1" in
|
|
|
|
0)
|
|
|
|
# for uninstall
|
|
|
|
rm /usr/share/applications/rustdesk.desktop || true
|
2022-10-11 19:52:03 +08:00
|
|
|
rm /usr/share/applications/rustdesk-link.desktop || true
|
2022-07-04 10:11:40 +08:00
|
|
|
update-desktop-database
|
|
|
|
;;
|
|
|
|
1)
|
|
|
|
# for upgrade
|
|
|
|
;;
|
|
|
|
esac
|