%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: calibre Version: 2.62.0 Release: 1%{?_dist_release} Summary: E-book converter and library management Group: Applications/Multimedia License: GPLv3 URL: http://calibre-ebook.com/ Vendor: Project Vine Distribution: Vine Linux # SourceURL: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz # Upstream packages some unfree fonts which we cannot redistribute. # While we're at it, also delete the liberation fonts which we already have. # # Download the upstream tarball and invoke this script while in the tarball's # directory: # ./generate-tarball.sh %{version} Source0: %{name}-%{version}-nofonts.tar.xz Source1: generate-tarball.sh Source2: calibre-mount-helper Source3: calibre-gui.appdata.xml # # Disable auto update from inside the app # Patch1: %{name}-no-update.patch # # Do not display multiple apps in desktop files, only the main app # This is so gnome-software only 'sees' calibre once. # Patch3: calibre-nodisplay.patch BuildRequires: python >= 2.7.1 BuildRequires: python-devel >= 2.7.1 BuildRequires: python-setuptools >= 2.7.1 BuildRequires: python-setuptools BuildRequires: python-qt5-devel BuildRequires: python-qt5 BuildRequires: python-qt5-webkit BuildRequires: podofo-devel >= 0.8.2 BuildRequires: desktop-file-utils BuildRequires: python-mechanize BuildRequires: python-lxml BuildRequires: python-dateutil BuildRequires: python-imaging BuildRequires: xdg-utils >= 1.0.2 BuildRequires: python-BeautifulSoup >= 3.0.5 BuildRequires: chmlib-devel >= 0.40 BuildRequires: python-cssutils >= 0.9.6 BuildRequires: sqlite3-devel BuildRequires: libicu-devel >= 4.4 BuildRequires: libpng-devel BuildRequires: libmtp-devel BuildRequires: qt5-qtbase-devel #BuildRequires: web-assets-devel BuildRequires: qt5-qtbase-static BuildRequires: libXrender-devel BuildRequires: qt5-qtwebkit-devel BuildRequires: openssl-devel # calibre installer is so smart that it check for the presence of the # directory (and then installs in the wrong place) BuildRequires: bash-completion BuildRequires: python-apsw BuildRequires: glib2-devel BuildRequires: fontconfig-devel BuildRequires: libinput-devel BuildRequires: libxkbcommon-devel %{?pyqt5_requires} # once ^^ %%pyqt5_requires is everywhere, can drop python-qt5 dep below -- rex # Add hard dep to specific qtbase pkg, see build message below -- rex # Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version. # Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point. # Project MESSAGE: This is not a bug, but a result of using Qt internals. You have been warned! BuildRequires: qt5-qtbase-private-devel %{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}} Requires: python-qt5 Requires: python-qt5-webkit Requires: qt5-qtwebkit Requires: qt5-qtsvg Requires: qt5-qtsensors Requires: python-cherrypy Requires: python-cssutils >= 0.9.9 Requires: odfpy Requires: python-lxml Requires: python-imaging Requires: python-mechanize Requires: python-dateutil Requires: python-genshi Requires: python-BeautifulSoup Requires: poppler-utils #Requires: python-feedparser Requires: python-netifaces Requires: python-dns Requires: python-apsw Requires: python-psutil Requires: python-pygments > 2.0.1 Requires: optipng #Requires: python-cssselect #Requires: mathjax ## vine Requires: TrueType-liberation %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, CHM, ODT, HTML, CBR, CBZ, RTF, TXT, PDF and LRS. %prep %setup -q # don't check for new upstream version (that's what packagers do) %patch1 -p1 -b .no-update # Hide individual launchers for ebook-edit, ebook-viewer and lrfviewer as they # are all accessible in the main calibre GUI. %patch3 -p1 -b .nodisplay # 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' resources/catalog/section_list_templates.py chmod -x src/calibre/*/*/*/*.py \ src/calibre/*/*/*.py \ src/calibre/*/*.py \ src/calibre/*.py rm -rvf resources/viewer/mathjax %build OVERRIDE_CFLAGS="%{optflags}" python setup.py build %install %__rm -rf %{buildroot} %__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 # create directory for gnome software data mkdir -p %{buildroot}%{_datadir}/appdata # create directory for calibre environment module # the install script assumes it's there. mkdir -p %{buildroot}%{python_sitelib} # create directory for completion files, so calibre knows where # to install them mkdir -p %{buildroot}%{_datadir}/bash-completion/completions mkdir -p %{buildroot}%{_datadir}/zsh/site-functions 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} \ --staging-sharedir=%{buildroot}%{_datadir} # remove shebang from init_calibre.py here because # it just got spawned by the install script 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 cp -p resources/images/tweak.png \ %{buildroot}%{_datadir}/pixmaps/calibre-ebook-edit.png # every file is empty here find %{buildroot}%{_datadir}/mime -maxdepth 1 -type f -print -delete # packages aren't allowed to register mimetypes like this rm -f %{buildroot}%{_datadir}/applications/defaults.list rm -f %{buildroot}%{_datadir}/applications/mimeinfo.cache rm -f %{buildroot}%{_datadir}/mime/application/*.xml rm -f %{buildroot}%{_datadir}/mime/text/*.xml 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 # 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 # these are provided as separate packages rm -rf %{buildroot}%{_libdir}/%{name}/{odf,cherrypy,encutils,cssutils} rm -rf %{buildroot}%{_libdir}/%{name}/cal/utils/genshi rm -rf %{buildroot}%{_libdir}/%{name}/cal/trac # rm empty feedparser files. rm -rf %{buildroot}%{_libdir}/%{name}/%{name}/web/feeds/feedparser.* ln -s %{python_sitelib}/feedparser.py \ %{buildroot}%{_libdir}/%{name}/%{name}/web/feeds/feedparser.py ln -s %{python_sitelib}/feedparser.pyc \ %{buildroot}%{_libdir}/%{name}/%{name}/web/feeds/feedparser.pyc ln -s %{python_sitelib}/feedparser.pyo \ %{buildroot}%{_libdir}/%{name}/%{name}/web/feeds/feedparser.pyo for f in %{_datadir}/fonts/TrueType-liberation/*; do ln -s $f %{buildroot}%{_datadir}/%{name}/fonts/liberation/ done # delete locales, calibre stores them in a zip file now rm -rf %{buildroot}%{_datadir}/%{name}/localization/locales/ rm -f %{buildroot}%{_bindir}/%{name}-uninstall cp -p %{SOURCE2} %{buildroot}%{_bindir}/calibre-mount-helper cp -p %{SOURCE3} %{buildroot}%{_datadir}/appdata/ %clean %{__rm} -rf %{buildroot} %post update-desktop-database &> /dev/null ||: update-mime-database %{_datadir}/mime &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %postun update-desktop-database &> /dev/null ||: update-mime-database %{_datadir}/mime &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %files %defattr(-,root,root,-) %license COPYRIGHT LICENSE %doc Changelog.yaml %{_bindir}/calibre %{_bindir}/calibre-complete %{_bindir}/calibre-customize %{_bindir}/calibre-debug %{_bindir}/calibre-parallel %{_bindir}/calibre-server %{_bindir}/calibre-smtp %{_bindir}/calibre-mount-helper %{_bindir}/calibredb %{_bindir}/ebook-convert %{_bindir}/ebook-device %{_bindir}/ebook-meta %{_bindir}/ebook-viewer %{_bindir}/fetch-ebook-metadata %{_bindir}/lrf2lrs %{_bindir}/lrfviewer %{_bindir}/lrs2lrf %{_bindir}/markdown-calibre %{_bindir}/web2disk %{_bindir}/ebook-polish %{_bindir}/ebook-edit %{_libdir}/%{name} %{_datadir}/%{name} %{_datadir}/pixmaps/* %{_datadir}/applications/*.desktop %{_datadir}/mime/packages/* %{_datadir}/icons/hicolor/*/mimetypes/* %{_datadir}/icons/hicolor/*/apps/* %{python_sitelib}/init_calibre.py* %{_datadir}/bash-completion/completions/%{name} %{_datadir}/zsh/site-functions/_%{name} %{_datadir}/appdata/calibre*.appdata.xml %changelog * Tue Jul 12 2016 Tomohiro "Tomo-p" KATO 2.62.0-1 - new upstream release. * Sun Aug 25 2013 Yoji TOYODA 0.8.50-2 - rebuild with ImageMagick-6.8.6.8 - add Patch3 (calibre-0.8.50-poppler-0.20.x.patch) * Tue May 8 2012 Munehiro Yamamoto 0.8.50-1 - new upstream release - BuildRequires: qt4-devel >= 4.8.0 - BuildRequires: PyQt4-devel >= 4.9.1 * Fri Mar 23 2012 Munehiro Yamamoto 0.8.44-1 - new upstream release * Sun Mar 11 2012 Munehiro Yamamoto 0.8.41-1 - new upstream release * Sun Mar 11 2012 Yoji TOYODA 0.7.50-2 - rebuild with ImageMagick-6.7.5.10 * Sun Mar 20 2011 Munehiro Yamamoto 0.7.50-1 - new upstream release * Sat Feb 19 2011 Munehiro Yamamoto 0.7.46-1 - new upstream release * Thu Feb 10 2011 Munehiro Yamamoto 0.7.44-1 - new upstream release * Fri Feb 04 2011 Munehiro Yamamoto 0.7.42-1 - new upstream release * Fri Jan 21 2011 Munehiro Yamamoto 0.7.40-1 - new upstream release * Mon Dec 27 2010 Munehiro Yamamoto 0.7.35-1 - new upstream release * Sun Dec 19 2010 Munehiro Yamamoto 0.7.34-1 - new upstream release * Mon Dec 13 2010 Munehiro Yamamoto 0.7.33-1 - new upstream release - added BuildRequires: libicu-devel * Sat Dec 11 2010 Munehiro Yamamoto 0.7.32-1 - new upstream release * Fri Nov 05 2010 Munehiro Yamamoto 0.7.26-1 - new upstream release * Sun Oct 31 2010 Munehiro Yamamoto 0.7.25-1 - new upstream release * Tue Oct 19 2010 Kevin Fenzi - 0.7.24-1 - Update to 0.7.24 * Sat Oct 09 2010 Kevin Fenzi - 0.7.23-1 - Update to 0.7.23 - Fix up mount helper with our own local script. - Change files to list binaries so missing ones can more easily be noted. * Mon Oct 04 2010 Kevin Fenzi - 0.7.22-1 - Update to 0.7.22 * Fri Oct 01 2010 Kevin Fenzi - 0.7.21-1 - Update to 0.7.21 * Wed Sep 29 2010 jkeating - 0.7.20-2 - Rebuilt for gcc bug 634757 * Fri Sep 24 2010 Kevin Fenzi - 0.7.20-1 - Update to 0.7.20 * Wed Sep 15 2010 Kevin Fenzi - 0.7.18-3 - Rebuild for new ImageMagick * Wed Sep 29 2010 Munehiro Yamamoto 0.7.18-1 - new upstream release - Fix svg/png changes. * Mon Sep 13 2010 Kevin Fenzi - 0.7.18-2 - Fix svg/png changes. * Sun Sep 12 2010 Kevin Fenzi - 0.7.18-1 - Update to 0.7.18 - Require > 0.9.6 cssutils * Fri Sep 03 2010 Kevin Fenzi - 0.7.17-1 - Update to 0.7.17 * Fri Aug 27 2010 Kevin Fenzi - 0.7.16-1 - Update to 0.7.16 * Mon Aug 23 2010 Munehiro Yamamoto - 0.7.15-1 - initial build based on Fedora development * Sat Aug 21 2010 Kevin Fenzi - 0.7.15-1 - Update to 0.7.15 * Thu Aug 19 2010 Rex Dieter - 0.7.14-2 - rebuild (poppler) * Fri Aug 13 2010 Kevin Fenzi - 0.7.14-1 - Update to 0.7.14 * Fri Aug 06 2010 Kevin Fenzi - 0.7.13-1 - Update to 0.7.13 * Mon Aug 02 2010 Kevin Fenzi - 0.7.12-1 - Update to 0.7.12 * Fri Jul 30 2010 Kevin Fenzi - 0.7.11-1 - Update to 0.7.11 * Fri Jul 30 2010 Kevin Fenzi - 0.7.10-2 - Rebuilt for python2.7 * Fri Jul 23 2010 Kevin Fenzi - 0.7.10-1 - Update to 0.7.10 * Sat Jul 17 2010 Kevin Fenzi - 0.7.9-1 - Update to 0.7.9 * Sun Jul 11 2010 Michal Nowak - 0.7.8-1 - Update to 0.7.8 - build tar.xz instead of tar.bz2 * Fri Jul 02 2010 Kevin Fenzi - 0.7.7-1 - Update to 0.7.7 * Wed Jun 30 2010 Kevin Fenzi - 0.7.6-1 - Update to 0.7.6 * Fri Jun 25 2010 Kevin Fenzi - 0.7.5-1 - Update to 0.7.5 * Sun Jun 20 2010 Kevin Fenzi - 0.7.4-1 - Update to 0.7.4 * Tue Jun 08 2010 Dan Horák - 0.7.1-2 - rebuilt with podofo 0.8.1 * Mon Jun 07 2010 Kevin Fenzi - 0.7.1-1 - Update to 0.7.1 - Added versioned dep on python-cssutils to make sure at least 0.9.6 is installed. * Fri Jun 04 2010 Kevin Fenzi - 0.7.0-1 - Update to 0.7.0 * Fri May 28 2010 Kevin Fenzi - 0.6.55-1 - Update to 0.6.55 * Fri May 21 2010 Kevin Fenzi - 0.6.54-1 - Update to 0.6.54 * Fri May 21 2010 Kevin Fenzi - 0.6.53-1 - Update to 0.6.53 * Wed May 5 2010 Marcela Maslanova - 0.6.47-2 - Rebuild against new poppler * Sat Apr 10 2010 Ionuț C. Arțăriși - 0.6.47-1 - new upstream release 0.6.47 - new chmlib requirement - create directory for calibre's environment module - use bzip2 instead of gzip when preparing tarball in generate-tarball.sh - remove cssutils patches (we now have python-cssutils 0.9.6 in Fedora) * Fri Feb 26 2010 Ionuț C. Arțăriși - 0.6.42-1 - new upstream release 0.6.42 - remove shebang from default_tweaks.py * Mon Feb 1 2010 Ionuț C. Arțăriși - 0.6.37-1 - new upstream release 0.6.37 * Fri Jan 29 2010 Ionuț C. Arțăriși - 0.6.36-1 - new upstream release 0.6.36 - fixed a cssprofiles issue with loading the profiles * Tue Jan 26 2010 Ionuț C. Arțăriși - 0.6.35-3 - added -cssprofiles patch to cvs * Tue Jan 26 2010 Ionuț C. Arțăriși - 0.6.35-2 - remove python-cssutils 0.9.6 dependency * Mon Jan 25 2010 Ionuț C. Arțăriși - 0.6.35-1 - new upstream release - fedora includes cssutils >= 0.9.6 now; removed the cssprofiles patch - removed -executables patch, upstream fixed it: http://bugs.calibre-ebook.com/ticket/4437 * Wed Jan 6 2010 Ionuț C. Arțăriși - 0.6.32-2 - fix for package tagged without adding new patch to cvs * Wed Jan 6 2010 Ionuț C. Arțăriși - 0.6.32-1 - new upstream release 0.6.32 - project website has changed - added python-BeautifulSoup BuildRequire - new patch to fix full buildpath in binary files * Sun Dec 6 2009 Ionuț C. Arțăriși - 0.6.26-1 - New upstream version - Regenerated no-update patch because of code relocation * Wed Dec 2 2009 Ionuț C. Arțăriși - 0.6.25-1 - New upstream release * Wed Nov 18 2009 Ionuț C. Arțăriși - 0.6.24-1 - New upstream release: http://calibre.kovidgoyal.net/wiki/Changelog#Version0.6.2416Nov2009 * Mon Nov 16 2009 Ionuț C. Arțăriși - 0.6.23-1 - new upstream release: http://calibre.kovidgoyal.net/wiki/Changelog#Version0.6.2313Nov2009 - patch to stop checking for new upstream version * Sat Nov 7 2009 Ionuț C. Arțăriși - 0.6.21-1 - new upstream version: http://calibre.kovidgoyal.net/wiki/Changelog#Version0.6.2106Nov2009 - added python-BeautifulSoup requirement * Wed Nov 4 2009 Ionuț Arțăriși - 0.6.20-1 - new upstream version: http://calibre.kovidgoyal.net/wiki/Changelog#Version0.6.2030Oct2009 - upstream now ships correct .desktop files - fixed missing dependency: PyQt4 - fixed calibre-gui icon * Thu Oct 22 2009 Ionuț C. Arțăriși - 0.6.19-3 - removed unfree fonts from source package * Thu Oct 22 2009 Ionuț C. Arțăriși - 0.6.19-2 - readability enhancements - added python-genshi requires - removed libwmf require since ImageMagick provides libwmf-lite as a dependency and that's what we actually need * Wed Oct 21 2009 Ionuț Arțăriși - 0.6.19-1 - new upstream version: http://calibre.kovidgoyal.net/wiki/Changelog#Version0.6.1920Oct2009 - delete fonts, calibre can find the system fonts - specify libdir as an install option, so calibre will link properly even on 64bit * Mon Oct 19 2009 Ionuț Arțăriși - 0.6.18-1 - updated requires list - new upstream release - can override CFLAGS now - removed trac and genshi duplicates - use xdg env variables to do desktop integration in the buildroot - added xdg-utils buildrequire - install udev rules in /usr/lib even on 64bit and don't own the whole dir - removed wrongly used Version field from .desktop files * Mon Oct 12 2009 Ionuț Arțăriși - 0.6.17-2 - mimick what calibre's desktop-integration script does (mimetypes, icons etc.) - removed unneeded INSTALL file - marked bash completion file as config(noreplace) and take ownership of the dir * Sat Oct 10 2009 Ionuț Arțăriși - 0.6.17-1 - new upstream release: http://calibre.kovidgoyal.net/wiki/Changelog#Version0.6.1709Oct2009 - the install process changed significantly - locales were added * Thu Sep 10 2009 Ionuț Arțăriși - 0.6.11-1 - new upstream release: http://calibre.kovidgoyal.net/wiki/Changelog#Version0.6.1104Sep2009 - minor path fixes - rearranged files section * Fri Aug 28 2009 Ionuț Arțăriși 0.6.10-1 - handle desktop files - don't compress manpages and don't list them as duplicates - added lrfviewer icon * Tue Aug 25 2009 Ionuț Arțăriși 0.6.8-1 - Initial RPM release