flameshot.spec 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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: 12.1.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. %if %{is_rhel_or_fedora}
  34. BuildRequires: cmake(KF5GuiAddons) >= 5.89.0
  35. %endif
  36. BuildRequires: cmake(Qt5DBus) >= 5.9.0
  37. BuildRequires: cmake(Qt5Gui) >= 5.9.0
  38. BuildRequires: cmake(Qt5LinguistTools) >= 5.9.0
  39. BuildRequires: cmake(Qt5Network) >= 5.9.0
  40. BuildRequires: cmake(Qt5Svg) >= 5.9.0
  41. BuildRequires: cmake(Qt5Widgets) >= 5.9.0
  42. Requires: hicolor-icon-theme
  43. %if %{is_rhel_or_fedora}
  44. Requires: qt5-qtbase >= 5.9.0
  45. Requires: qt5-qttools >= 5.9.0
  46. Requires: qt5-qtsvg%{?_isa} >= 5.9.0
  47. %endif
  48. %if %{is_suse_leap}
  49. Requires: libQt5Core5 >= 5.9.0
  50. Requires: libqt5-qttools >= 5.9.0
  51. Requires: libQt5Svg5 >= 5.9.0
  52. %endif
  53. Recommends: xdg-desktop-portal%{?_isa}
  54. Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa})
  55. Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa})
  56. Recommends: (xdg-desktop-portal-wlr%{?_isa} if wlroots%{?_isa})
  57. %description
  58. Powerful and simple to use screenshot software with built-in
  59. editor with advanced features.
  60. Features:
  61. * Customizable appearance.
  62. * Easy to use.
  63. * In-app screenshot edition.
  64. * DBus interface.
  65. * Upload to Imgur
  66. %prep
  67. %autosetup -p1
  68. %build
  69. %if %{is_suse_leap}
  70. %cmake -DCMAKE_BUILD_TYPE=Release
  71. %endif
  72. %if %{is_rhel_or_fedora}
  73. %cmake -G Ninja \
  74. -DCMAKE_BUILD_TYPE=Release \
  75. -DUSE_WAYLAND_CLIPBOARD:BOOL=ON \
  76. %endif
  77. %cmake_build
  78. %install
  79. %cmake_install
  80. # https://fedoraproject.org/wiki/PackagingDrafts/find_lang
  81. %find_lang Internationalization --with-qt
  82. %if %{is_suse_leap}
  83. %suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility
  84. %endif
  85. %fdupes %{buildroot}%{_datadir}/icons
  86. %check
  87. %if %{is_rhel_or_fedora}
  88. appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
  89. %endif
  90. %if %{is_suse_leap}
  91. appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
  92. %endif
  93. desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
  94. %files -f Internationalization.lang
  95. %{_datadir}/%{name}/translations/Internationalization_grc.qm
  96. %doc README.md
  97. %license LICENSE
  98. %dir %{_datadir}/%{name}
  99. %dir %{_datadir}/%{name}/translations
  100. %dir %{_datadir}/bash-completion/completions
  101. %dir %{_datadir}/zsh/site-functions
  102. %{_bindir}/%{name}
  103. %{_datadir}/applications/org.flameshot.Flameshot.desktop
  104. %if %{is_suse_leap}
  105. %{_datadir}/metainfo/org.flameshot.Flameshot.metainfo.xml
  106. %endif
  107. %if %{is_rhel_or_fedora}
  108. %{_metainfodir}/org.flameshot.Flameshot.metainfo.xml
  109. %endif
  110. %{_datadir}/bash-completion/completions/%{name}
  111. %{_datadir}/zsh/site-functions/_%{name}
  112. %{_datadir}/fish/vendor_completions.d/%{name}.fish
  113. %{_datadir}/dbus-1/interfaces/org.flameshot.Flameshot.xml
  114. %{_datadir}/dbus-1/services/org.flameshot.Flameshot.service
  115. %{_datadir}/icons/hicolor/*/apps/*.png
  116. %{_datadir}/icons/hicolor/scalable/apps/*.svg
  117. %{_mandir}/man1/%{name}.1*
  118. %changelog
  119. * Wed Jun 21 2022 Jeremy Borgman <borgman.jeremy@pm.me> - 12.0.0-1
  120. - Update for 12.0 release.
  121. * Fri Jan 14 2022 Jeremy Borgman <borgman.jeremy@pm.me> - 11.0.0-1
  122. - Update for 11.0 release.
  123. * Sun Aug 29 2021 Zetao Yang <vitzys@outlook.com> - 0.10.1-2
  124. - Minor SPEC fixes.
  125. * Sun Jul 25 2021 Jeremy Borgman <borgman.jeremy@pm.me> - 0.10.1-1
  126. - Updated for flameshot 0.10.1
  127. * Mon May 17 2021 Jeremy Borgman <borgman.jeremy@pm.me> - 0.10.0-1
  128. - Updated for flameshot 0.10.0
  129. * Sat Feb 27 2021 Jeremy Borgman <borgman.jeremy@pm.me> - 0.9.0-1
  130. - Updated for flameshot 0.9.0
  131. * Wed Oct 14 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.5-1
  132. - Updated for flameshot 0.8.5
  133. * Sat Oct 10 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.4-1
  134. - Updated for flameshot 0.8.4
  135. * Sat Sep 19 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.3-1
  136. - Updated for flameshot 0.8.3
  137. * Mon Sep 07 2020 Zetao Yang <vitzys@outlook.com> - 0.8.0-1
  138. - Updated for flameshot 0.8.0
  139. - More details, please see https://flameshot.org/changelog/#v080
  140. * Sat Aug 18 2018 Zetao Yang <vitzys@outlook.com> - 0.6.0-1
  141. - Updated for flameshot 0.6.0
  142. - More details, please see https://flameshot.org/changelog/#v060
  143. * Tue Jan 09 2018 Zetao Yang <vitzys@outlook.com> - 0.5.0-1
  144. - Initial package for flameshot 0.5.0
  145. - More details, please see https://flameshot.org/changelog/#v050