sigil-vl.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. %define pkgname Sigil
  2. %define _qt4_qmake %{_libdir}/qt4/bin/qmake
  3. Name: sigil
  4. Version: 0.2.4
  5. Release: 1%{?_dist_release}
  6. Summary: A WYSIWYG ebook editor
  7. Summary(ja): WYSIWYG 電子書籍エディタ
  8. License: GPLv3
  9. Group: Applications/Publishing
  10. Url: http://sigil.googlecode.com/
  11. Source0: http://sigil.googlecode.com/files/%{pkgname}-%{version}-Code.zip
  12. ## Vine
  13. Source10: sigil.desktop
  14. Patch0: sigil-0.2.2-fix-format-string.patch
  15. # from Anssi: this makes it use system libs instead of bundled ones. Except for
  16. # libtidy which has some local hacks not present in system-provided libtidy.
  17. Patch1: sigil-0.2.4-use-system-libs.patch
  18. BuildRequires: desktop-file-utils
  19. BuildRequires: unzip
  20. BuildRequires: zlib-devel
  21. BuildRequires: bzip2-devel
  22. BuildRequires: cmake >= 2.6.0
  23. BuildRequires: qt4-devel >= 4.6.0
  24. BuildRequires: libboost-devel
  25. BuildRequires: libboost-thread
  26. BuildRequires: libboost-date-time
  27. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  28. Distribution: Vine
  29. Vendor: Project Vine
  30. Packager: munepi
  31. %description
  32. Sigil is a multi-platform WYSIWYG ebook editor.
  33. It is designed to edit books in ePub format.
  34. %description -l ja
  35. Sigil はマルチプラットフォームに対応した WYSIWYG 電子書籍エディタです。
  36. ePub 形式の電子書籍を編集するように設計されています。
  37. %prep
  38. %setup -q -n %{pkgname}-%{version}-Code
  39. %patch0 -p0 -b .format-string
  40. %patch1 -p1 -b .system-libs
  41. # fix end of line encoding for the docs:
  42. %__sed -i 's/\r//' ChangeLog.txt README.txt COPYING.txt
  43. %build
  44. unset QTDIR || : ; . /etc/profile.d/qt4.sh
  45. ## from sigil-0.2.4-1mdv2011.0
  46. # there are only internal helper libs, and they need to be static as build
  47. # fails otherwise (they contain undefined symbols), and making them shared
  48. # libs wouldn't make sense anyway (they are not shared by anything else)
  49. # - Anssi 06/2010
  50. %__cmake -G "Unix Makefiles" \
  51. -DCMAKE_BUILD_TYPE=Release \
  52. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
  53. -DLIB_INSTALL_DIR:PATH=%{_libdir} \
  54. -DQT_QMAKE_EXECUTABLE=%_qt4_qmake \
  55. ;
  56. %__make %{?_smp_mflags}
  57. %install
  58. %__rm -rf %{buildroot}
  59. %__make install DESTDIR=%{buildroot}
  60. # install icons for the .desktop file
  61. for i in 16 32 48 128 256 512; do
  62. [ -f src/Sigil/Resource_Files/icon/app_icon_${i}.png ] || exit 1
  63. %__install -m644 -D src/Sigil/Resource_Files/icon/app_icon_${i}.png \
  64. %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/sigil.png
  65. done
  66. # create a .desktop file:
  67. %__mkdir_p %{buildroot}%{_datadir}/applications
  68. desktop-file-install --vendor="vine" \
  69. --dir=%{buildroot}%{_datadir}/applications \
  70. %{SOURCE10}
  71. %clean
  72. %__rm -rf %buildroot
  73. %post
  74. touch --no-create %{_datadir}/icons/hicolor
  75. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  76. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
  77. fi
  78. update-desktop-database &> /dev/null || :
  79. %postun
  80. touch --no-create %{_datadir}/icons/hicolor
  81. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  82. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
  83. fi
  84. update-desktop-database &> /dev/null || :
  85. %files
  86. %defattr(-,root,root)
  87. %doc ChangeLog.txt README.txt COPYING.txt INSTALL.txt
  88. %{_bindir}/%{name}
  89. %{_datadir}/applications/*-%{name}.desktop
  90. %{_datadir}/icons/hicolor/*/apps/*.png
  91. %changelog
  92. * Sat Aug 21 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.4-1
  93. - initial build