fbreader-vl.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. ## set Qt4 for make
  2. %define my_make %__make QTPATH=${QTDIR} QTINCLUDE="-I ${QTDIR}/../include" MOC=%{_libdir}/qt4/bin/moc LDFLAGS="-L $QTDIR"
  3. Name: fbreader
  4. Version: 0.12.10
  5. Release: 2%{?_dist_release}
  6. Summary: E-book reader
  7. Group: Applications/Publishing
  8. License: GPLv2+
  9. URL: http://www.fbreader.org/
  10. Source0: http://www.fbreader.org/fbreader-sources-%{version}.tgz
  11. Source1: README.Fedora
  12. Patch0: fbreader-0.12.9-desktop-file.patch
  13. Patch1: fbreader-optflags.patch
  14. # Use to expose the compiler flags used during build
  15. # Patch2: fbreader-debug.patch
  16. Patch3: fbreader-defaults.patch
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  18. BuildRequires: expat-devel bzip2-devel liblinebreak-devel
  19. BuildRequires: gtk2-devel fribidi-devel
  20. BuildRequires: curl-devel >= 7.17
  21. BuildRequires: libjpeg-devel desktop-file-utils
  22. BuildRequires: qt4-devel sqlite3-devel
  23. # needed because sometimes the API change without soname bump
  24. Requires: zlibrary = %{version}-%{release}
  25. %description
  26. FBReader is an e-book reader, with the following main features:
  27. * Supports several formats: fb2, HTML, CHM, plucker, Palmdoc, zTxt
  28. (Weasel), TCR (psion), RTF, OEB, OpenReader, mobipocket, plain text.
  29. * Direct reading from tar, zip, gzip and bzip2 archives. (Multiple
  30. books in one archive are supported.)
  31. * Automatic library building.
  32. * Automatic encoding detection is supported.
  33. * Automatically generated contents table.
  34. * Embedded images support.
  35. * Footnotes/hyperlinks support.
  36. * Position indicator.
  37. * Keeps the last open book and the last read positions for all opened
  38. books between runs.
  39. * List of last opened books.
  40. * Automatic hyphenations. Liang's algorithm is used. The same
  41. algorithm is used in TeX, and TeX hyphenation patterns are used in
  42. FBReader. Patterns for Czech, English, Esperanto, French, German and
  43. Russian are included in the current version.
  44. * Text search.
  45. * Full-screen mode.
  46. * Screen rotation by 90, 180 and 270 degrees.
  47. #'
  48. %package gtk
  49. Summary: E-book reader (GTK+ interface)
  50. Group: Applications/Publishing
  51. Requires: %{name} = %{version}-%{release}
  52. Requires: zlibrary-ui-gtk = %{version}-%{release}
  53. %description gtk
  54. A virtual package that bundles both the FBreader e-book reader and its
  55. GTK+ user interface.
  56. %package qt
  57. Summary: E-book reader (Qt interface)
  58. Group: Applications/Publishing
  59. Requires: %{name} = %{version}-%{release}
  60. Requires: zlibrary-ui-qt = %{version}-%{release}
  61. %description qt
  62. A virtual package that bundles both the FBreader e-book reader and its
  63. Qt4 user interface.
  64. %package -n zlibrary
  65. Summary: Cross-platform GUI library
  66. Group: System Environment/Libraries
  67. Requires: zlibrary-ui = %{version}-%{release}
  68. %description -n zlibrary
  69. ZLibrary is a cross-platform library to build applications running on
  70. desktop Linux, Windows, and different Linux-based PDAs.
  71. %package -n zlibrary-devel
  72. Summary: Development files for zlibrary
  73. Group: Development/Libraries
  74. Requires: zlibrary = %{version}-%{release}
  75. %description -n zlibrary-devel
  76. This package contains the libraries amd header files that are needed
  77. for writing applications with Zlibrary.
  78. %package -n zlibrary-ui-gtk
  79. Summary: GTK+ interface module for ZLibrary
  80. Group: System Environment/Libraries
  81. Provides: zlibrary-ui = %{version}-%{release}
  82. Requires(posttrans): /sbin/update-alternatives
  83. Requires(postun): /sbin/update-alternatives
  84. %description -n zlibrary-ui-gtk
  85. ZLibrary is a cross-platform library to build applications running on
  86. desktop Linux, Windows, and different Linux-based PDAs.
  87. This package provides a GTK+-based UI for ZLibrary.
  88. %package -n zlibrary-ui-qt
  89. Summary: Qt4 interface module for ZLibrary
  90. Group: System Environment/Libraries
  91. Provides: zlibrary-ui = %{version}-%{release}
  92. Provides: zlibrary-ui-qt4 = %{version}-%{release}
  93. Obsoletes: zlibrary-ui-qt4 < %{version}-%{release}
  94. Requires(posttrans): /sbin/update-alternatives
  95. Requires(postun): /sbin/update-alternatives
  96. %description -n zlibrary-ui-qt
  97. ZLibrary is a cross-platform library to build applications running on
  98. desktop Linux, Windows, and different Linux-based PDAs.
  99. This package provides a Qt4-based UI for ZLibrary.
  100. %prep
  101. %setup -q
  102. %patch0 -p1 -b .desktop-file
  103. %patch1 -p0 -b .optflags
  104. #%patch2 -p0 -b .debug
  105. %patch3 -p0 -b .defaults
  106. cp -p %{SOURCE1} .
  107. %build
  108. ## export $QTDIR
  109. unset QTDIR || : ; . /etc/profile.d/qt4.sh
  110. %my_make %{?_smp_mflags} -C zlibrary/core TARGET_ARCH=desktop \
  111. LIBDIR=%{_libdir} UI_TYPE=dummy
  112. %my_make %{?_smp_mflags} -C zlibrary/text TARGET_ARCH=desktop \
  113. LIBDIR=%{_libdir} UI_TYPE=dummy
  114. %my_make %{?_smp_mflags} -C zlibrary/ui TARGET_ARCH=desktop \
  115. LIBDIR=%{_libdir} UI_TYPE=gtk
  116. %my_make %{?_smp_mflags} -C zlibrary/ui TARGET_ARCH=desktop \
  117. LIBDIR=%{_libdir} UI_TYPE=qt4
  118. %my_make %{?_smp_mflags} -C fbreader TARGET_ARCH=desktop \
  119. LIBDIR=%{_libdir} UI_TYPE=dummy
  120. %install
  121. %__rm -rf $RPM_BUILD_ROOT
  122. %__make -C zlibrary/core do_install do_install_dev \
  123. DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
  124. LIBDIR=%{_libdir} UI_TYPE=dummy
  125. %__make -C zlibrary/text do_install do_install_dev \
  126. DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
  127. LIBDIR=%{_libdir} UI_TYPE=dummy
  128. %__make -C zlibrary/ui do_install DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
  129. LIBDIR=%{_libdir} UI_TYPE=gtk
  130. %__make -C zlibrary/ui do_install DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
  131. LIBDIR=%{_libdir} UI_TYPE=qt4
  132. %__make -C fbreader do_install DESTDIR=$RPM_BUILD_ROOT TARGET_ARCH=desktop \
  133. UI_TYPE=dummy
  134. desktop-file-install --vendor="vine" \
  135. --remove-category="Application" \
  136. --delete-original \
  137. --dir=%{buildroot}%{_datadir}/applications \
  138. %{buildroot}%{_datadir}/applications/FBReader.desktop
  139. %clean
  140. %__rm -rf $RPM_BUILD_ROOT
  141. %post -n zlibrary -p /sbin/ldconfig
  142. %postun -n zlibrary -p /sbin/ldconfig
  143. %posttrans -n zlibrary-ui-gtk
  144. /sbin/update-alternatives \
  145. --install \
  146. %{_libdir}/zlibrary/ui/zlui-active.so \
  147. zlibrary-ui \
  148. %{_libdir}/zlibrary/ui/zlui-gtk.so \
  149. 2
  150. %posttrans -n zlibrary-ui-qt
  151. /sbin/update-alternatives \
  152. --install \
  153. %{_libdir}/zlibrary/ui/zlui-active.so \
  154. zlibrary-ui \
  155. %{_libdir}/zlibrary/ui/zlui-qt4.so \
  156. 1
  157. %postun -n zlibrary-ui-gtk
  158. if [ $1 -eq 0 ]; then
  159. /sbin/update-alternatives --remove zlibrary-ui \
  160. %{_libdir}/zlibrary/ui/zlui-gtk.so
  161. fi
  162. exit 0
  163. %postun -n zlibrary-ui-qt
  164. if [ $1 -eq 0 ]; then
  165. /sbin/update-alternatives --remove unison \
  166. %{_libdir}/zlibrary/ui/zlui-qt4.so
  167. fi
  168. exit 0
  169. %files
  170. %defattr(-,root,root,-)
  171. %doc fbreader/LICENSE README.Fedora
  172. %{_bindir}/FBReader
  173. %{_datadir}/FBReader
  174. %{_datadir}/applications/*-FBReader.desktop
  175. %{_datadir}/pixmaps/FBReader.png
  176. %{_datadir}/pixmaps/FBReader
  177. %files gtk
  178. %files qt
  179. %files -n zlibrary
  180. %defattr(-,root,root,-)
  181. %doc fbreader/LICENSE
  182. %{_libdir}/lib*.so.*
  183. %dir %{_libdir}/zlibrary
  184. %dir %{_libdir}/zlibrary/ui
  185. %exclude %{_datadir}/zlibrary/keynames-*.xml
  186. %{_datadir}/zlibrary
  187. %files -n zlibrary-devel
  188. %defattr(-,root,root,-)
  189. %{_includedir}/*
  190. %{_libdir}/lib*.so
  191. %files -n zlibrary-ui-gtk
  192. %defattr(-,root,root,-)
  193. %{_libdir}/zlibrary/ui/zlui-gtk.so
  194. %{_datadir}/zlibrary/keynames-gtk.xml
  195. %files -n zlibrary-ui-qt
  196. %defattr(-,root,root,-)
  197. %{_libdir}/zlibrary/ui/zlui-qt4.so
  198. %{_datadir}/zlibrary/keynames-qt4.xml
  199. %changelog
  200. * Sat Jan 28 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.12.10-2
  201. - rebuild
  202. * Thu Aug 12 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 0.12.10-1
  203. - initial build based on Fedora development
  204. * Mon Jun 7 2010 Michel Salim <salimma@fedoraproject.org> - 0.12.10-1
  205. - Update to 0.12.10
  206. * Sun Mar 28 2010 Michel Salim <salimma@fedoraproject.org> - 0.12.9-1
  207. - Update to 0.12.9
  208. * Sat Feb 13 2010 Michel Salim <salimma@fedoraproject.org> - 0.12.2-1
  209. - Update to 0.12.2
  210. - Fix overlap between fbreader and zlibrary
  211. * Tue Jan 26 2010 Michel Salim <salimma@fedoraproject.org> - 0.12.1-1
  212. - Update to 0.12.1
  213. * Sat Oct 17 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.7-4
  214. - Provide virtual packages for each available interface
  215. - Use alternatives to select the user interface (see README.Fedora)
  216. * Thu Sep 17 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.7-3
  217. - Split out zlibrary and zlibrary-ui subpackages (fixes bz# 523946)
  218. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.7-2
  219. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  220. * Tue Mar 31 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.7-1
  221. - Update to 0.10.7
  222. * Tue Feb 24 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.3-3
  223. - Fix for GCC 4.4
  224. * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.3-2
  225. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  226. * Thu Feb 5 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.3-1
  227. - Update to 0.10.3
  228. * Wed Jan 28 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.2-1
  229. - Update to 0.10.2
  230. * Wed Jan 14 2009 Michel Salim <salimma@fedoraproject.org> - 0.10.0-1
  231. - Update to 0.10.0
  232. * Thu Jul 31 2008 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.8.17-1
  233. - Update to 0.8.17
  234. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.8.12-2
  235. - Autorebuild for GCC 4.3
  236. * Sun Jan 20 2008 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.12-1
  237. - Update to 0.8.12
  238. * Mon Jan 7 2008 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.10-1
  239. - Update to 0.8.10
  240. - Remove workaround for PDB issues on x86_64; fixed upstream
  241. * Thu Dec 20 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.8a-1
  242. - Update to 0.8.8a
  243. - Workaround for PDB format handler when reading certain files
  244. * Wed Dec 19 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.8-2
  245. - Fix inclusion of debug files where libdir=/usr/lib (bz #411891)
  246. * Sun Dec 2 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.8-1
  247. - Update to 0.8.8
  248. * Thu Oct 18 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.6d-3
  249. - Generate proper -debuginfo subpackage (bz #329841, Ville Skytta)
  250. - Add README.Fedora detailing zTXT bug on x86_64
  251. * Sat Sep 22 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.6d-2
  252. - Fix vendor tag
  253. - Use compiler flags provided by the system
  254. * Sun Sep 16 2007 Michel Alexandre Salim <michel.sylvan@gmail.com> - 0.8.6d-1
  255. - Initial package