Name: calibre Version: 0.8.40 Release: 1 Summary: E-book converter and library management Group: Text tools License: GPL URL: http://calibre-ebook.com/ Source0: http://calibre-ebook.googlecode.com/files/%{name}-%{version}.tar.xz Patch0: %{name}-manpages.patch Patch1: %{name}-no-update.patch Patch3: %{name}-0.7.27-python-fix.patch BuildRequires: python-devel >= 2.6 BuildRequires: ImageMagick-devel BuildRequires: python-setuptools BuildRequires: qt4-devel BuildRequires: python-qt4-devel >= 4.8.2 BuildRequires: python-qt4-scripttools BuildRequires: libpoppler-qt4-devel >= 0.12 BuildRequires: podofo-devel BuildRequires: desktop-file-utils BuildRequires: python-mechanize BuildRequires: python-lxml BuildRequires: python-cssutils >= 0.9.6 BuildRequires: python-dateutil BuildRequires: python-imaging BuildRequires: python-sqlite2 BuildRequires: xdg-utils BuildRequires: python-beautifulsoup BuildRequires: unzip BuildRequires: libwmf-devel BuildRequires: chmlib-devel BuildRequires: icu-devel Requires: python-qt4-gui Requires: python-qt4-svg Requires: python-qt4-webkit Requires: pyPdf Requires: python-cherrypy Requires: python-cssutils Requires: ImageMagick Requires: python-odf Requires: python-django-tagging Requires: python-lxml Requires: python-imaging Requires: python-mechanize Requires: python-dateutil Requires: python-genshi Requires: python-beautifulsoup # Require the packages of the files which are symlinked by calibre Requires: fonts-ttf-liberation # E-mail functionality requires this package # see https://bugs.launchpad.net/calibre/+bug/739073 Requires: python-dnspython %description Calibre is meant to be a complete e-library solution. It includes library management, format conversion, news feeds to ebook conversion as well as e-book reader sync features. Calibre is primarily a ebook cataloging program. It manages your ebook collection for you. It is designed around the concept of the logical book, i.e. a single entry in the database that may correspond to ebooks in several formats. It also supports conversion to and from a dozen different ebook formats. Supported input formats are: MOBI, LIT, PRC, EPUB, ODT, HTML, CBR, CBZ, RTF, TXT, PDF, CHM and LRS. %prep %setup -q -n %{name} # remove redundant / non-free fonts rm -rf resources/fonts/* %patch0 -p1 -b .manpages %patch1 -p1 -b .no-update %patch3 -p1 -b .python-fix # dos2unix newline conversion %{__sed} -i 's/\r//' src/calibre/web/feeds/recipes/* # remove shebangs %{__sed} -i -e '/^#!\//, 1d' src/calibre/*/*/*/*.py %{__sed} -i -e '/^#!\//, 1d' src/calibre/*/*/*.py %{__sed} -i -e '/^#![ ]*\//, 1d' src/calibre/*/*.py %{__sed} -i -e '/^#!\//, 1d' src/calibre/*.py %{__sed} -i -e '/^#!\//, 1d' src/templite/*.py %{__sed} -i -e '/^#!\//, 1d' resources/default_tweaks.py %{__sed} -i -e '/^#!\//, 1d' recipes/*.recipe %{__chmod} -x src/calibre/*/*/*/*.py %{__chmod} -x src/calibre/*/*/*.py %{__chmod} -x src/calibre/*/*.py %{__chmod} -x src/calibre/*.py %{__chmod} -x recipes/*.recipe %build OVERRIDE_CFLAGS="%{optflags}" python setup.py build %install mkdir -p %{buildroot}%{_datadir} # create directories for xdg-utils mkdir -p %{buildroot}%{_datadir}/icons mkdir -p %{buildroot}%{_datadir}/icons/hicolor mkdir -p %{buildroot}%{_datadir}/packages mkdir -p %{buildroot}%{_datadir}/mime mkdir -p %{buildroot}%{_datadir}/mime/packages mkdir -p %{buildroot}%{_datadir}/applications mkdir -p %{buildroot}%{_datadir}/desktop-directories mkdir -p %{buildroot}%{python_sitelib} XDG_DATA_DIRS="%{buildroot}%{_datadir}" \ XDG_UTILS_INSTALL_MODE="system" \ LIBPATH="%{_libdir}" \ python setup.py install --root=%{buildroot}%{_prefix} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --staging-libdir=%{buildroot}%{_libdir} %{__sed} -i -e '/^#!\//, 1d' %{buildroot}%{python_sitelib}/init_calibre.py # icons mkdir -p %{buildroot}%{_datadir}/pixmaps/ cp -p resources/images/library.png \ %{buildroot}%{_datadir}/pixmaps/%{name}-gui.png cp -p resources/images/viewer.png \ %{buildroot}%{_datadir}/pixmaps/calibre-viewer.png # every file is empty here find %{buildroot}%{_datadir}/mime -maxdepth 1 -type f|xargs rm -f # the portable batch (>=0.8.5) is not needed rm -f %{buildroot}%{_bindir}/calibre-portable.bat # packages aren't allowed to register mimetypes like this rm -f %{buildroot}%{_datadir}/applications/{defaults.list,mimeinfo.cache} desktop-file-validate \ %{buildroot}%{_datadir}/applications/calibre-ebook-viewer.desktop desktop-file-validate \ %{buildroot}%{_datadir}/applications/calibre-gui.desktop desktop-file-validate \ %{buildroot}%{_datadir}/applications/calibre-lrfviewer.desktop mv %{buildroot}%{_datadir}/mime/packages/calibre-mimetypes \ %{buildroot}%{_datadir}/mime/packages/calibre-mimetypes.xml # mimetype icon for lrf rm -rf %{buildroot}%{_datadir}/icons/hicolor/128x128 mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps cp -p resources/images/mimetypes/lrf.png \ %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/application-x-sony-bbeb.png cp -p resources/images/viewer.png \ %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/calibre-viewer.png # don't put bash completions in /usr/etc mv %{buildroot}%{_prefix}%{_sysconfdir} %{buildroot} # these are provided as separate packages rm -rf %{buildroot}%{_libdir}/%{name}/{odf,cherrypy,pyPdf,encutils,cssutils} rm -rf %{buildroot}%{_libdir}/%{name}/cal/utils/genshi rm -rf %{buildroot}%{_libdir}/%{name}/cal/trac # link to system fonts after we have deleted the non-free ones # http://bugs.calibre-ebook.com/ticket/3832 mkdir -p %{buildroot}%{_datadir}/%{name}/fonts/prs500/ ln -s %{_datadir}/fonts/TTF/liberation/LiberationSans-Regular.ttf \ %{buildroot}%{_datadir}/%{name}/fonts/prs500/tt0003m_.ttf ln -s %{_datadir}/fonts/TTF/liberation/LiberationSerif-Regular.ttf \ %{buildroot}%{_datadir}/%{name}/fonts/prs500/tt0011m_.ttf ln -s %{_datadir}/fonts/TTF/liberation/LiberationMono-Regular.ttf \ %{buildroot}%{_datadir}/%{name}/fonts/prs500/tt0419m_.ttf # man pages mv %{buildroot}%{_datadir}/%{name}/man %{buildroot}%{_mandir} # move locales # localization has changed since calibre-0.8.5 # locale.zip is treated internally at runtime # so the traditional locale fixes are moot. # locales should still be looked for in the proper place # but under the new localization zip-based schema %{__sed} -i -e 's:localization/locale.zip:%{_datadir}/%{name}/localization/locales.zip:' %{buildroot}%{_libdir}/%{name}/%{name}/utils/localization.py %{__rm} -f %{buildroot}%{_bindir}/%{name}-uninstall %files %defattr(-,root,root,-) %doc COPYRIGHT LICENSE Changelog.yaml %{_bindir}/* %config(noreplace) %{_sysconfdir}/bash_completion.d/%{name} %{_libdir}/%{name} %{_datadir}/%{name} %{_datadir}/pixmaps/* %{_datadir}/applications/* %{_datadir}/mime/packages/* %{_datadir}/icons/hicolor/scalable/mimetypes/* %{_datadir}/icons/hicolor/scalable/apps/* %{_mandir}/man1/* %{python_sitelib}/init_calibre.py* %changelog * Sat Feb 18 2012 Alexander Khrukin 0.8.40-1 + Revision: 777055 - version update 0.8.40 - version update 0.8.38 * Sun Jan 29 2012 Alexander Khrukin 0.8.37-1 + Revision: 769558 - version update 0.8.37 * Sat Jan 14 2012 Alexander Khrukin 0.8.35-1 + Revision: 760865 - version update 0.8.35 + Rafael da Veiga Cabral - add poppler 0.18.1 build compatibilty + Matthew Dawkins - added some spec changes from mga to fix build - rediffed calibre-no-update.patch - rediffed manpage patch - new version 0.8.18 * Sun Jun 05 2011 Funda Wang 0.7.57-2 + Revision: 682812 - rebuild for new icu + Götz Waschk - bump pyqt4 dep - depend on python 2.6 only * Tue Apr 26 2011 Götz Waschk 0.7.57-1 + Revision: 659245 - update to new version 0.7.57 - reduce qt4 deps * Mon Mar 28 2011 Matthew Dawkins 0.7.52-1 + Revision: 648705 - added BR icu-devel - fixed build - rediff p1 for no-update - new version 0.7.52 - removed explicit python BR - bumped python-devel version requirement * Fri Mar 11 2011 Funda Wang 0.7.32-3 + Revision: 643736 - rebuild for new poppler * Thu Dec 30 2010 Funda Wang 0.7.32-2mdv2011.0 + Revision: 626152 - rebuild for new poppler * Sat Dec 04 2010 Tomas Kindl 0.7.32-1mdv2011.0 + Revision: 609311 - update to 0.7.32 * Sun Nov 28 2010 Ahmad Samir 0.7.31-1mdv2011.0 + Revision: 602480 - update to 0.7.31 - Make python-fix patch detect the version of python used in the chroot; this way one patch can be used for cooker and backports * Sun Nov 14 2010 Ahmad Samir 0.7.27-1mdv2011.0 + Revision: 597480 - Update to 0.7.27 * Mon Nov 01 2010 Ahmad Samir 0.7.26-1mdv2011.0 + Revision: 591686 - update to 0.7.26 - rediff python-fix patch. Now there're two patches, one for python-2.7 for distro >= 2011.0 and another for python-2.6 for older stable distros (so that it can be backported). * Tue Oct 26 2010 Ahmad Samir 0.7.24-1mdv2011.0 + Revision: 589452 - update to 0.7.24 * Tue Oct 12 2010 Ahmad Samir 0.7.23-1mdv2011.0 + Revision: 585054 - update to 0.7.23 * Thu Oct 07 2010 Matthew Dawkins 0.7.22-1mdv2011.0 + Revision: 583906 - new version 0.7.22 * Sat Oct 02 2010 Ahmad Samir 0.7.21-1mdv2011.0 + Revision: 582432 - update to 0.7.21 * Tue Sep 28 2010 Ahmad Samir 0.7.20-1mdv2011.0 + Revision: 581851 - update to 0.7.20 * Sat Sep 18 2010 Ahmad Samir 0.7.19-1mdv2011.0 + Revision: 579439 - update to 0.7.19 * Sun Sep 12 2010 Ahmad Samir 0.7.18-1mdv2011.0 + Revision: 577831 - update to 0.7.18 - icons are now .png * Mon Sep 06 2010 Buchan Milne 0.7.17-1mdv2011.0 + Revision: 576247 - update to new version 0.7.17 * Wed Aug 25 2010 Ahmad Samir 0.7.15-1mdv2011.0 + Revision: 573287 - update to 0.7.15 (and in the way rebuild for new podofo) * Sun Aug 22 2010 Funda Wang 0.7.14-2mdv2011.0 + Revision: 571800 - rebuild for new poppler + Tomas Kindl - bump to 0.7.14 * Sun Aug 08 2010 Ahmad Samir 0.7.13-1mdv2011.0 + Revision: 567781 - update to 0.7.13 * Fri Aug 06 2010 Ahmad Samir 0.7.12-1mdv2011.0 + Revision: 567146 - update to 0.7.12 * Thu Aug 05 2010 Funda Wang 0.7.10-3mdv2011.0 + Revision: 566253 - rebuild for new poppler * Fri Jul 30 2010 Ahmad Samir 0.7.10-2mdv2011.0 + Revision: 563265 - update manpage and no-update patches (from Fedora) - drop SOURCE1 and python-cssutils hack, it's not needed anymore as python-cssutils has been updated to 0.9.7b3 - build with optflags - delete mimeinfo.cache too + Juan Luis Baptiste - Updated to 0.7.10, redo diff calibre-no-update.patch. * Sat Jul 10 2010 Funda Wang 0.6.54-2mdv2011.0 + Revision: 549995 - rebuild for new imagemagick + Tomas Kindl - various minor SPEC fixes and clean-ups + Juan Luis Baptiste - Updated to 0.6.54. * Tue Apr 20 2010 Tomas Kindl 0.6.48-1mdv2010.1 + Revision: 537127 - update to 0.6.48 - fix python-odf and python-django-tagging dependency' * Tue Apr 20 2010 Tomas Kindl 0.6.47-3mdv2010.1 + Revision: 536983 - fix incorrect odf-py require & bump release - fix incorrect odf-py require * Mon Apr 19 2010 Tomas Kindl 0.6.47-2mdv2010.1 + Revision: 536555 - enable PoDoFo dependency as we have PoDoFo in MDV now * Sun Apr 18 2010 Tomas Kindl 0.6.47-1mdv2010.1 + Revision: 536529 - initial import containing all pertinent fixes to ensure it will build on Mandriva... - create calibre