fb2edit.spec 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #
  2. # spec file for package fb2edit
  3. #
  4. # Copyright (c) 2012 Denis Kandrashin, Kyrill Detinov
  5. # This file and all modifications and additions to the pristine
  6. # package are under the same license as the package itself.
  7. #
  8. Name: fb2edit
  9. Version: 0.0.6
  10. Release: 0
  11. License: GPL-3.0
  12. Summary: FB2 Files Editor
  13. URL: http://fb2edit.lintest.ru
  14. Group: Productivity/Text/Editors
  15. Source0: http://www.lintest.ru/pub/%{name}_%{version}.orig.tar.bz2
  16. Source90: %{name}_%{version}-squeeze1.debian.tar.gz
  17. Source91: %{name}_%{version}-squeeze1.dsc
  18. Source92: %{name}_%{version}-squeeze1_source.changes
  19. BuildRequires: cmake
  20. BuildRequires: desktop-file-utils
  21. BuildRequires: gcc-c++
  22. BuildRequires: hicolor-icon-theme
  23. BuildRequires: pkgconfig(QtCore) >= 4.6.0
  24. BuildRequires: pkgconfig(QtGui) >= 4.6.0
  25. BuildRequires: pkgconfig(QtNetwork) >= 4.6.0
  26. BuildRequires: pkgconfig(QtWebKit) >= 4.6.0
  27. BuildRequires: pkgconfig(QtXml) >= 4.6.0
  28. BuildRequires: pkgconfig(libxml-2.0)
  29. BuildRoot: %{_tmppath}/%{name}-%{version}-build
  30. %if 0%{?suse_version}
  31. BuildRequires: update-desktop-files
  32. %endif
  33. %description
  34. fb2edit is an application for editing FB2 e-books files.
  35. Authors:
  36. --------
  37. Denis Kandrashin <mail@lintest.ru>
  38. %prep
  39. %setup -q
  40. %build
  41. mkdir build
  42. cd build
  43. export CFLAGS="%{optflags}"
  44. export CXXFLAGS="%{optflags}"
  45. cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix}
  46. make %{?_smp_mflags} VERBOSE=1
  47. %install
  48. pushd build
  49. %make_install
  50. popd
  51. %if 0%{?fedora_version}
  52. desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
  53. %endif
  54. %if 0%{?suse_version}
  55. %suse_update_desktop_file %{name}
  56. %endif
  57. %if 0%{?fedora_version}
  58. %post
  59. /usr/bin/update-desktop-database &> /dev/null || :
  60. /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
  61. %postun
  62. /usr/bin/update-desktop-database &> /dev/null || :
  63. if [ $1 -eq 0 ] ; then
  64. /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
  65. /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
  66. fi
  67. %posttrans
  68. /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
  69. %endif
  70. %if 0%{?mandriva_version}
  71. %post
  72. %update_desktop_database
  73. %update_icon_cache hicolor
  74. %update_menus
  75. %postun
  76. %clean_desktop_database
  77. %update_icon_cache hicolor
  78. %clean_menus
  79. %endif
  80. %if 0%{?suse_version}
  81. %post
  82. %desktop_database_post
  83. %icon_theme_cache_post
  84. %postun
  85. %desktop_database_postun
  86. %icon_theme_cache_postun
  87. %endif
  88. %files
  89. %defattr(-,root,root,-)
  90. %doc AUTHORS LICENSE
  91. %{_bindir}/%{name}
  92. %{_datadir}/applications/%{name}.desktop
  93. %{_datadir}/icons/hicolor/*/*/%{name}.png
  94. %{_datadir}/pixmaps/%{name}.png
  95. %changelog