flameshot.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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: 0.10.1
  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. %description
  51. Powerful and simple to use screenshot software with built-in
  52. editor with advanced features.
  53. Features:
  54. * Customizable appearance.
  55. * Easy to use.
  56. * In-app screenshot edition.
  57. * DBus interface.
  58. * Upload to Imgur
  59. %prep
  60. %autosetup -p1
  61. %build
  62. %if %{is_suse_leap}
  63. %cmake -DCMAKE_BUILD_TYPE=Release
  64. %endif
  65. %if %{is_rhel_or_fedora}
  66. %cmake -G Ninja -DCMAKE_BUILD_TYPE=Release
  67. %endif
  68. %cmake_build
  69. %install
  70. %cmake_install
  71. # https://fedoraproject.org/wiki/PackagingDrafts/find_lang
  72. %find_lang Internationalization --with-qt
  73. %if %{is_suse_leap}
  74. %suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility
  75. %endif
  76. %fdupes %{buildroot}%{_datadir}/icons
  77. %check
  78. %if %{is_rhel_or_fedora}
  79. appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
  80. %endif
  81. %if %{is_suse_leap}
  82. appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
  83. %endif
  84. desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
  85. %files -f Internationalization.lang
  86. %doc README.md
  87. %license LICENSE
  88. %dir %{_datadir}/%{name}
  89. %dir %{_datadir}/%{name}/translations
  90. %dir %{_datadir}/bash-completion/completions
  91. %dir %{_datadir}/zsh/site-functions
  92. %{_bindir}/%{name}
  93. %{_datadir}/applications/org.flameshot.Flameshot.desktop
  94. %if %{is_suse_leap}
  95. %{_datadir}/metainfo/org.flameshot.Flameshot.metainfo.xml
  96. %endif
  97. %if %{is_rhel_or_fedora}
  98. %{_metainfodir}/org.flameshot.Flameshot.metainfo.xml
  99. %endif
  100. %{_datadir}/bash-completion/completions/%{name}
  101. %{_datadir}/zsh/site-functions/_%{name}
  102. %{_datadir}/dbus-1/interfaces/org.flameshot.Flameshot.xml
  103. %{_datadir}/dbus-1/services/org.flameshot.Flameshot.service
  104. %{_datadir}/icons/hicolor/*/apps/*.png
  105. %{_datadir}/icons/hicolor/scalable/apps/*.svg
  106. %{_mandir}/man1/%{name}.1*
  107. %changelog
  108. * Sun Aug 29 2021 Zetao Yang <vitzys@outlook.com> - 0.10.1-2
  109. - Minor SPEC fixes.
  110. * Sun Jul 25 2021 Jeremy Borgman <borgman.jeremy@pm.me> - 0.10.1-1
  111. - Updated for flameshot 0.10.1
  112. * Mon May 17 2021 Jeremy Borgman <borgman.jeremy@pm.me> - 0.10.0-1
  113. - Updated for flameshot 0.10.0
  114. * Sat Feb 27 2021 Jeremy Borgman <borgman.jeremy@pm.me> - 0.9.0-1
  115. - Updated for flameshot 0.9.0
  116. * Wed Oct 14 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.5-1
  117. - Updated for flameshot 0.8.5
  118. * Sat Oct 10 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.4-1
  119. - Updated for flameshot 0.8.4
  120. * Sat Sep 19 2020 Jeremy Borgman <borgman.jeremy@pm.me> - 0.8.3-1
  121. - Updated for flameshot 0.8.3
  122. * Mon Sep 07 2020 Zetao Yang <vitzys@outlook.com> - 0.8.0-1
  123. - Updated for flameshot 0.8.0
  124. - More details, please see https://flameshot.org/changelog/#v080
  125. * Sat Aug 18 2018 Zetao Yang <vitzys@outlook.com> - 0.6.0-1
  126. - Updated for flameshot 0.6.0
  127. - More details, please see https://flameshot.org/changelog/#v060
  128. * Tue Jan 09 2018 Zetao Yang <vitzys@outlook.com> - 0.5.0-1
  129. - Initial package for flameshot 0.5.0
  130. - More details, please see https://flameshot.org/changelog/#v050