flameshot.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. #
  2. # spec file for package flameshot on fedora, rehl, opensuse leap 15.x
  3. #
  4. # fedora >= 30, rhel >=7
  5. %define is_rhel_or_fedora (0%{?fedora} && 0%{?fedora} >= 30) || (0%{?rhel} && 0%{?rhel} >= 7)
  6. # openSUSE Leap >= 15.2
  7. %define is_suse_leap (0%{?is_opensuse} && 0%{?sle_version} >= 150200)
  8. Name: flameshot
  9. Version: 11.0.0
  10. %if %{is_rhel_or_fedora}
  11. Release: 1%{?dist}
  12. %endif
  13. %if %{is_suse_leap}
  14. Release: 1
  15. %endif
  16. License: GPLv3+ and ASL 2.0 and GPLv2 and LGPLv3 and Free Art
  17. Summary: Powerful yet simple to use screenshot software
  18. URL: https://github.com/flameshot-org/flameshot
  19. Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
  20. BuildRequires: cmake >= 3.13.0
  21. BuildRequires: gcc-c++ >= 7
  22. BuildRequires: fdupes
  23. %if %{is_suse_leap}
  24. BuildRequires: update-desktop-files
  25. BuildRequires: appstream-glib
  26. %endif
  27. %if %{is_rhel_or_fedora}
  28. BuildRequires: libappstream-glib
  29. BuildRequires: ninja-build
  30. %endif
  31. BuildRequires: desktop-file-utils
  32. BuildRequires: cmake(Qt5Core) >= 5.9.0
  33. BuildRequires: cmake(Qt5DBus) >= 5.9.0
  34. BuildRequires: cmake(Qt5Gui) >= 5.9.0
  35. BuildRequires: cmake(Qt5LinguistTools) >= 5.9.0
  36. BuildRequires: cmake(Qt5Network) >= 5.9.0
  37. BuildRequires: cmake(Qt5Svg) >= 5.9.0
  38. BuildRequires: cmake(Qt5Widgets) >= 5.9.0
  39. Requires: hicolor-icon-theme
  40. %if %{is_rhel_or_fedora}
  41. Requires: qt5-qtbase >= 5.9.0
  42. Requires: qt5-qttools >= 5.9.0
  43. Requires: qt5-qtsvg%{?_isa} >= 5.9.0
  44. %endif
  45. %if %{is_suse_leap}
  46. Requires: libQt5Core5 >= 5.9.0
  47. Requires: libqt5-qttools >= 5.9.0
  48. Requires: libQt5Svg5 >= 5.9.0
  49. %endif
  50. Recommends: xdg-desktop-portal%{?_isa}
  51. Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa})
  52. Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa})
  53. Recommends: (xdg-desktop-portal-wlr%{?_isa} if wlroots%{?_isa})
  54. %description
  55. Powerful and simple to use screenshot software with built-in
  56. editor with advanced features.
  57. Features:
  58. * Customizable appearance.
  59. * Easy to use.
  60. * In-app screenshot edition.
  61. * DBus interface.
  62. * Upload to Imgur
  63. %prep
  64. %autosetup -p1
  65. %build
  66. %if %{is_suse_leap}
  67. %cmake -DCMAKE_BUILD_TYPE=Release
  68. %endif
  69. %if %{is_rhel_or_fedora}
  70. %cmake -G Ninja -DCMAKE_BUILD_TYPE=Release
  71. %endif
  72. %cmake_build
  73. %install
  74. %cmake_install
  75. # https://fedoraproject.org/wiki/PackagingDrafts/find_lang
  76. %find_lang Internationalization --with-qt
  77. %if %{is_suse_leap}
  78. %suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility
  79. %endif
  80. %fdupes %{buildroot}%{_datadir}/icons
  81. %check
  82. %if %{is_rhel_or_fedora}
  83. appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
  84. %endif
  85. %if %{is_suse_leap}
  86. appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
  87. %endif
  88. desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
  89. %files -f Internationalization.lang
  90. %doc README.md
  91. %license LICENSE
  92. %dir %{_datadir}/%{name}
  93. %dir %{_datadir}/%{name}/translations
  94. %dir %{_datadir}/bash-completion/completions
  95. %dir %{_datadir}/zsh/site-functions
  96. %{_bindir}/%{name}
  97. %{_datadir}/applications/org.flameshot.Flameshot.desktop
  98. %if %{is_suse_leap}
  99. %{_datadir}/metainfo/org.flameshot.Flameshot.metainfo.xml
  100. %endif
  101. %if %{is_rhel_or_fedora}
  102. %{_metainfodir}/org.flameshot.Flameshot.metainfo.xml
  103. %endif
  104. %{_datadir}/bash-completion/completions/%{name}
  105. %{_datadir}/zsh/site-functions/_%{name}
  106. %{_datadir}/fish/vendor_completions.d/%{name}.fish
  107. %{_datadir}/dbus-1/interfaces/org.flameshot.Flameshot.xml
  108. %{_datadir}/dbus-1/services/org.flameshot.Flameshot.service
  109. %{_datadir}/icons/hicolor/*/apps/*.png
  110. %{_datadir}/icons/hicolor/scalable/apps/*.svg
  111. %{_mandir}/man1/%{name}.1*
  112. %changelog
  113. * Fri Jan 14 2022 Jeremy Borgman <borgman.jeremy@pm.me> - 11.0.0-1
  114. - Update for 11.0 release.
  115. * Sun Aug 29 2021 Zetao Yang <vitzys@outlook.com> - 0.10.1-2
  116. - Minor SPEC fixes.
  117. * Sun Jul 25 2021 Jeremy Borgman <borgman.jeremy@pm.me> - 0.10.1-1
  118. - Updated for flameshot 0.10.1
  119. * Mon May 17 2021 Jeremy Borgman <borgman.jeremy@pm.me> - 0.10.0-1
  120. - Updated for flameshot 0.10.0
  121. * Sat Feb 27 2021 Jeremy Borgman <borgman.jeremy@pm.me> - 0.9.0-1
  122. - Updated for flameshot 0.9.0
  123. * Wed Oct 14 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.5-1
  124. - Updated for flameshot 0.8.5
  125. * Sat Oct 10 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.4-1
  126. - Updated for flameshot 0.8.4
  127. * Sat Sep 19 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.3-1
  128. - Updated for flameshot 0.8.3
  129. * Mon Sep 07 2020 Zetao Yang <vitzys@outlook.com> - 0.8.0-1
  130. - Updated for flameshot 0.8.0
  131. - More details, please see https://flameshot.org/changelog/#v080
  132. * Sat Aug 18 2018 Zetao Yang <vitzys@outlook.com> - 0.6.0-1
  133. - Updated for flameshot 0.6.0
  134. - More details, please see https://flameshot.org/changelog/#v060
  135. * Tue Jan 09 2018 Zetao Yang <vitzys@outlook.com> - 0.5.0-1
  136. - Initial package for flameshot 0.5.0
  137. - More details, please see https://flameshot.org/changelog/#v050