sigil-vl.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. %define pkgname Sigil
  2. %define _qt4_qmake %{_libdir}/qt4/bin/qmake
  3. Name: sigil
  4. Version: 0.3.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.3.4-use-system-libs-vine.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.7.0
  24. BuildRequires: libboost-devel
  25. BuildRequires: libboost-thread
  26. BuildRequires: libboost-date-time
  27. BuildRequires: libboost-filesystem
  28. BuildRequires: libboost-regex
  29. #BuildRequires: xerces-c-devel
  30. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  31. Distribution: Vine
  32. Vendor: Project Vine
  33. Packager: munepi
  34. %description
  35. Sigil is a free, open source WYSIWYG ebook editor.
  36. It is designed to edit books in ePub format.
  37. %description -l ja
  38. Sigil はオープンソース WYSIWYG 電子書籍エディタです。
  39. ePub 形式の電子書籍を編集するように設計されています。
  40. %prep
  41. %setup -q -n %{pkgname}-%{version}-Code
  42. %patch0 -p0 -b .format-string
  43. %patch1 -p1 -b .system-libs
  44. #%__rm -fr src/BoostParts
  45. # fix end of line encoding for the docs:
  46. %__sed -i 's/\r//' ChangeLog.txt README.txt COPYING.txt
  47. %build
  48. unset QTDIR || : ; . /etc/profile.d/qt4.sh
  49. ## from sigil-0.3.4-1mdv2011.0
  50. # there are only internal helper libs, and they need to be static as build
  51. # fails otherwise (they contain undefined symbols), and making them shared
  52. # libs wouldn't make sense anyway (they are not shared by anything else)
  53. # - Anssi 06/2010
  54. %__cmake -G "Unix Makefiles" \
  55. -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_STATIC_LIBS:BOOL=ON \
  56. -DCMAKE_BUILD_TYPE=Release \
  57. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
  58. -DLIB_INSTALL_DIR:PATH=%{_libdir} \
  59. -DQT_QMAKE_EXECUTABLE=%_qt4_qmake \
  60. ;
  61. %__make %{?_smp_mflags}
  62. %install
  63. %__rm -rf %{buildroot}
  64. %__make install DESTDIR=%{buildroot}
  65. # remove unused files
  66. %__rm %{buildroot}%{_datadir}/pixmaps/sigil.png || exit 1
  67. %__rm %{buildroot}%{_datadir}/applications/sigil.desktop || exit 1
  68. # install icons for the .desktop file
  69. for i in 16 32 48 128 256 512; do
  70. [ -f src/Sigil/Resource_Files/icon/app_icon_${i}.png ] || exit 1
  71. %__install -m644 -D src/Sigil/Resource_Files/icon/app_icon_${i}.png \
  72. %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/sigil.png || exit 1
  73. done
  74. # create a .desktop file:
  75. %__mkdir_p %{buildroot}%{_datadir}/applications
  76. desktop-file-install --vendor="vine" \
  77. --dir=%{buildroot}%{_datadir}/applications \
  78. %{SOURCE10}
  79. %clean
  80. %__rm -rf %buildroot
  81. %post
  82. touch --no-create %{_datadir}/icons/hicolor
  83. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  84. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
  85. fi
  86. update-desktop-database &> /dev/null || :
  87. %postun
  88. touch --no-create %{_datadir}/icons/hicolor
  89. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  90. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
  91. fi
  92. update-desktop-database &> /dev/null || :
  93. %files
  94. %defattr(-,root,root)
  95. %doc ChangeLog.txt README.txt COPYING.txt INSTALL.txt
  96. %{_bindir}/%{name}
  97. %{_datadir}/applications/*-%{name}.desktop
  98. %{_datadir}/icons/hicolor/*/apps/*.png
  99. %changelog
  100. * Sun Feb 20 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.3.4-1
  101. - new upstream release
  102. - added BuildRequires: libboost-filesystem, libboost-regex
  103. * Fri Jan 21 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.4-2
  104. - rebuilt with current libboost
  105. * Sat Aug 21 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.2.4-1
  106. - initial build