Automatic import for version 0.7.57

This commit is contained in:
Rosa 2012-02-01 22:04:55 +04:00
commit e33908b1ed
5 changed files with 443 additions and 0 deletions

2
.abf.yml Normal file
View file

@ -0,0 +1,2 @@
sources:
"calibre-0.7.57.tar.gz": 59dbb49dee94dea12cc07481f49cf5ba355cff0e

View file

@ -0,0 +1,10 @@
--- a/setup/extensions.py 2010-04-09 09:31:09.000000000 +0200
+++ b/setup/extensions.py 2010-04-18 16:09:28.000000000 +0200
@@ -377,6 +377,7 @@
makefile=mf, universal=OSX_SDK, qt=1)
makefile.extra_lflags = qt_objects
makefile.extra_include_dirs = ext.inc_dirs
+ makefile.LIBS.append('-lpython'+sysconfig.get_python_version())
makefile.generate()
subprocess.check_call([make, '-f', mf], cwd=src_dir)

37
calibre-manpages.patch Normal file
View file

@ -0,0 +1,37 @@
diff -up calibre/src/calibre/linux.py.manpages calibre/src/calibre/linux.py
--- calibre/src/calibre/linux.py.manpages 2010-04-10 19:34:42.632332811 +0300
+++ calibre/src/calibre/linux.py 2010-04-10 19:34:50.404207554 +0300
@@ -339,7 +339,7 @@ class PostInstall:
continue
parser = parser()
raw = create_man_page(prog, parser)
- if isfreebsd:
+ if isfreebsd or islinux:
manfile = os.path.join(manpath, prog+'.1')
else:
manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2')
diff -up calibre/src/calibre/utils/help2man.py.manpages calibre/src/calibre/utils/help2man.py
--- calibre/src/calibre/utils/help2man.py.manpages 2010-04-10 19:30:51.670926847 +0300
+++ calibre/src/calibre/utils/help2man.py 2010-04-10 19:32:27.842332121 +0300
@@ -4,7 +4,7 @@ __copyright__ = '2009, Kovid Goyal <kovi
__docformat__ = 'restructuredtext en'
import time, bz2
-from calibre.constants import isfreebsd
+from calibre.constants import isfreebsd, islinux
from calibre.constants import __version__, __appname__, __author__
@@ -58,9 +58,7 @@ def create_man_page(prog, parser):
lines = [x if isinstance(x, unicode) else unicode(x, 'utf-8', 'replace') for
x in lines]
- if not isfreebsd:
- return bz2.compress((u'\n'.join(lines)).encode('utf-8'))
- else:
+ if isfreebsd or islinux:
return (u'\n'.join(lines)).encode('utf-8')
-
-
+ else:
+ return bz2.compress((u'\n'.join(lines)).encode('utf-8'))

21
calibre-no-update.patch Normal file
View file

@ -0,0 +1,21 @@
--- calibre/src/calibre/gui2/update.py~ 2011-03-25 19:30:09.000000000 -0600
+++ calibre/src/calibre/gui2/update.py 2011-03-28 13:19:55.986558857 -0600
@@ -86,12 +86,12 @@
class UpdateMixin(object):
- def __init__(self, opts):
- if not opts.no_update_check:
- self.update_checker = CheckForUpdates(self)
- self.update_checker.update_found.connect(self.update_found,
- type=Qt.QueuedConnection)
- self.update_checker.start()
+ #def __init__(self, opts):
+ #if not opts.no_update_check:
+ # self.update_checker = CheckForUpdates(self)
+ # self.update_checker.update_found.connect(self.update_found,
+ # type=Qt.QueuedConnection)
+ # self.update_checker.start()
def update_found(self, version, force=False):
os = 'windows' if iswindows else 'osx' if isosx else 'linux'

373
calibre.spec Normal file
View file

@ -0,0 +1,373 @@
Name: calibre
Version: 0.7.57
Release: %mkrel 2
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.gz
Patch0: %{name}-manpages.patch
Patch1: %{name}-no-update.patch
Patch3: %{name}-0.7.27-python-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
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
%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' 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
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
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
# 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
mv %{buildroot}%{_datadir}/%{name}/localization/locales \
%{buildroot}%{_datadir}/locale
for file in %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/messages.mo; do
lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
mv %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/messages.mo \
%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo
done;
for file in %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/iso639.mo; do
lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
mv %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/iso639.mo \
%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_iso639.mo
done;
for file in %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/qt.qm; do
lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
mv $file %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_$lang.qm
done;
# remove udev hack - it's not needed...
rm -f %{buildroot}%{_prefix}/lib/udev/rules.d/*
%find_lang %{name} --with-kde --all-name
# locales should be looked for in the proper place
%{__sed} -i -e "s:P('localization/locales:('/usr/share/locale:" \
-e "s/messages.mo/calibre.mo/" \
-e "s/iso639.mo/calibre_iso639.mo/" \
%{buildroot}%{_libdir}/%{name}/%{name}/utils/localization.py
%{__rm} -f %{buildroot}%{_bindir}/%{name}-uninstall
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYRIGHT LICENSE Changelog.yaml
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/bash_completion.d/%{name}
%{_libdir}/%{name}
%{_datadir}/%{name}
%{_datadir}/locale/*/*/*.qm
%{_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
* Sun Jun 05 2011 Funda Wang <fwang@mandriva.org> 0.7.57-2mdv2011.0
+ Revision: 682812
- rebuild for new icu
+ Götz Waschk <waschk@mandriva.org>
- bump pyqt4 dep
- depend on python 2.6 only
* Tue Apr 26 2011 Götz Waschk <waschk@mandriva.org> 0.7.57-1
+ Revision: 659245
- update to new version 0.7.57
- reduce qt4 deps
* Mon Mar 28 2011 Matthew Dawkins <mattydaw@mandriva.org> 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 <fwang@mandriva.org> 0.7.32-3
+ Revision: 643736
- rebuild for new poppler
* Thu Dec 30 2010 Funda Wang <fwang@mandriva.org> 0.7.32-2mdv2011.0
+ Revision: 626152
- rebuild for new poppler
* Sat Dec 04 2010 Tomas Kindl <supp@mandriva.org> 0.7.32-1mdv2011.0
+ Revision: 609311
- update to 0.7.32
* Sun Nov 28 2010 Ahmad Samir <ahmadsamir@mandriva.org> 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 <ahmadsamir@mandriva.org> 0.7.27-1mdv2011.0
+ Revision: 597480
- Update to 0.7.27
* Mon Nov 01 2010 Ahmad Samir <ahmadsamir@mandriva.org> 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 <ahmadsamir@mandriva.org> 0.7.24-1mdv2011.0
+ Revision: 589452
- update to 0.7.24
* Tue Oct 12 2010 Ahmad Samir <ahmadsamir@mandriva.org> 0.7.23-1mdv2011.0
+ Revision: 585054
- update to 0.7.23
* Thu Oct 07 2010 Matthew Dawkins <mattydaw@mandriva.org> 0.7.22-1mdv2011.0
+ Revision: 583906
- new version 0.7.22
* Sat Oct 02 2010 Ahmad Samir <ahmadsamir@mandriva.org> 0.7.21-1mdv2011.0
+ Revision: 582432
- update to 0.7.21
* Tue Sep 28 2010 Ahmad Samir <ahmadsamir@mandriva.org> 0.7.20-1mdv2011.0
+ Revision: 581851
- update to 0.7.20
* Sat Sep 18 2010 Ahmad Samir <ahmadsamir@mandriva.org> 0.7.19-1mdv2011.0
+ Revision: 579439
- update to 0.7.19
* Sun Sep 12 2010 Ahmad Samir <ahmadsamir@mandriva.org> 0.7.18-1mdv2011.0
+ Revision: 577831
- update to 0.7.18
- icons are now .png
* Mon Sep 06 2010 Buchan Milne <bgmilne@mandriva.org> 0.7.17-1mdv2011.0
+ Revision: 576247
- update to new version 0.7.17
* Wed Aug 25 2010 Ahmad Samir <ahmadsamir@mandriva.org> 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 <fwang@mandriva.org> 0.7.14-2mdv2011.0
+ Revision: 571800
- rebuild for new poppler
+ Tomas Kindl <supp@mandriva.org>
- bump to 0.7.14
* Sun Aug 08 2010 Ahmad Samir <ahmadsamir@mandriva.org> 0.7.13-1mdv2011.0
+ Revision: 567781
- update to 0.7.13
* Fri Aug 06 2010 Ahmad Samir <ahmadsamir@mandriva.org> 0.7.12-1mdv2011.0
+ Revision: 567146
- update to 0.7.12
* Thu Aug 05 2010 Funda Wang <fwang@mandriva.org> 0.7.10-3mdv2011.0
+ Revision: 566253
- rebuild for new poppler
* Fri Jul 30 2010 Ahmad Samir <ahmadsamir@mandriva.org> 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 <juancho@mandriva.org>
- Updated to 0.7.10, redo diff calibre-no-update.patch.
* Sat Jul 10 2010 Funda Wang <fwang@mandriva.org> 0.6.54-2mdv2011.0
+ Revision: 549995
- rebuild for new imagemagick
+ Tomas Kindl <supp@mandriva.org>
- various minor SPEC fixes and clean-ups
+ Juan Luis Baptiste <juancho@mandriva.org>
- Updated to 0.6.54.
* Tue Apr 20 2010 Tomas Kindl <supp@mandriva.org> 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 <supp@mandriva.org> 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 <supp@mandriva.org> 0.6.47-2mdv2010.1
+ Revision: 536555
- enable PoDoFo dependency as we have PoDoFo in MDV now
* Sun Apr 18 2010 Tomas Kindl <supp@mandriva.org> 0.6.47-1mdv2010.1
+ Revision: 536529
- initial import containing all pertinent fixes to ensure it will build on Mandriva...
- create calibre