rpm-flutter.spec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. Name: rustdesk
  2. Version: 1.3.3
  3. Release: 0
  4. Summary: RPM package
  5. License: GPL-3.0
  6. URL: https://rustdesk.com
  7. Vendor: rustdesk <info@rustdesk.com>
  8. Requires: gtk3 libxcb libxdo libXfixes alsa-lib libvdpau libva pam gstreamer1-plugins-base
  9. Recommends: libayatana-appindicator-gtk3
  10. 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)
  11. %description
  12. The best open-source remote desktop client software, written in Rust.
  13. %prep
  14. # we have no source, so nothing here
  15. %build
  16. # we have no source, so nothing here
  17. # %global __python %{__python3}
  18. %install
  19. mkdir -p "%{buildroot}/usr/lib/rustdesk" && cp -r ${HBB}/flutter/build/linux/x64/release/bundle/* -t "%{buildroot}/usr/lib/rustdesk"
  20. mkdir -p "%{buildroot}/usr/bin"
  21. install -Dm 644 $HBB/res/rustdesk.service -t "%{buildroot}/usr/share/rustdesk/files"
  22. install -Dm 644 $HBB/res/rustdesk.desktop -t "%{buildroot}/usr/share/rustdesk/files"
  23. install -Dm 644 $HBB/res/rustdesk-link.desktop -t "%{buildroot}/usr/share/rustdesk/files"
  24. install -Dm 644 $HBB/res/128x128@2x.png "%{buildroot}/usr/share/icons/hicolor/256x256/apps/rustdesk.png"
  25. install -Dm 644 $HBB/res/scalable.svg "%{buildroot}/usr/share/icons/hicolor/scalable/apps/rustdesk.svg"
  26. %files
  27. /usr/lib/rustdesk/*
  28. /usr/share/rustdesk/files/rustdesk.service
  29. /usr/share/icons/hicolor/256x256/apps/rustdesk.png
  30. /usr/share/icons/hicolor/scalable/apps/rustdesk.svg
  31. /usr/share/rustdesk/files/rustdesk.desktop
  32. /usr/share/rustdesk/files/rustdesk-link.desktop
  33. %changelog
  34. # let's skip this for now
  35. # https://www.cnblogs.com/xingmuxin/p/8990255.html
  36. %pre
  37. # can do something for centos7
  38. case "$1" in
  39. 1)
  40. # for install
  41. ;;
  42. 2)
  43. # for upgrade
  44. systemctl stop rustdesk || true
  45. ;;
  46. esac
  47. %post
  48. cp /usr/share/rustdesk/files/rustdesk.service /etc/systemd/system/rustdesk.service
  49. cp /usr/share/rustdesk/files/rustdesk.desktop /usr/share/applications/
  50. cp /usr/share/rustdesk/files/rustdesk-link.desktop /usr/share/applications/
  51. ln -s /usr/lib/rustdesk/rustdesk /usr/bin/rustdesk
  52. systemctl daemon-reload
  53. systemctl enable rustdesk
  54. systemctl start rustdesk
  55. update-desktop-database
  56. %preun
  57. case "$1" in
  58. 0)
  59. # for uninstall
  60. systemctl stop rustdesk || true
  61. systemctl disable rustdesk || true
  62. rm /etc/systemd/system/rustdesk.service || true
  63. ;;
  64. 1)
  65. # for upgrade
  66. ;;
  67. esac
  68. %postun
  69. case "$1" in
  70. 0)
  71. # for uninstall
  72. rm /usr/share/applications/rustdesk.desktop || true
  73. rm /usr/share/applications/rustdesk-link.desktop || true
  74. rm /usr/bin/rustdesk || true
  75. update-desktop-database
  76. ;;
  77. 1)
  78. # for upgrade
  79. ;;
  80. esac