[calibre] Update to 0.8.7 Update no-update patch Adapt locales handling to upstream changes (locale files are

chkr chkr at fedoraproject.org
Mon Jun 27 22:40:24 UTC 2011


commit c7176a1a1430dac22e71c4919f3b58a5dfa327a2
Author: Christian Krause <chkr at fedoraproject.org>
Date:   Tue Jun 28 00:40:00 2011 +0200

    Update to 0.8.7
    Update no-update patch
    Adapt locales handling to upstream changes
    (locale files are now placed into a single zip file)

 .gitignore              |    1 +
 calibre-no-update.patch |   20 +++++++++++---------
 calibre.spec            |   45 ++++++++++++++-------------------------------
 sources                 |    2 +-
 4 files changed, 27 insertions(+), 41 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 660ea92..e72a887 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,3 +45,4 @@ calibre-0.7.14-nofonts.tar.xz
 /calibre-0.8.2-nofonts.tar.xz
 /calibre-0.8.3-nofonts.tar.xz
 /calibre-0.8.4-nofonts.tar.xz
+/calibre-0.8.7-nofonts.tar.xz
diff --git a/calibre-no-update.patch b/calibre-no-update.patch
index 5fe6e02..3a0e8d7 100644
--- a/calibre-no-update.patch
+++ b/calibre-no-update.patch
@@ -1,7 +1,7 @@
 diff -uNr calibre.old/src/calibre/gui2/ui.py calibre/src/calibre/gui2/ui.py
---- calibre.old/src/calibre/gui2/ui.py	2011-01-11 22:08:00.684511166 +0100
-+++ calibre/src/calibre/gui2/ui.py	2011-01-11 22:11:34.522099663 +0100
-@@ -590,7 +590,7 @@
+--- calibre.old/src/calibre/gui2/ui.py	2011-06-26 19:51:17.912975862 +0200
++++ calibre/src/calibre/gui2/ui.py	2011-06-26 19:52:21.156346644 +0200
+@@ -647,7 +647,7 @@
          if write_settings:
              self.write_settings()
          self.check_messages_timer.stop()
@@ -9,26 +9,28 @@ diff -uNr calibre.old/src/calibre/gui2/ui.py calibre/src/calibre/gui2/ui.py
 +        # self.update_checker.terminate()
          self.listener.close()
          self.job_manager.server.close()
-         while self.spare_servers:
+         self.job_manager.threaded_server.close()
 diff -uNr calibre.old/src/calibre/gui2/update.py calibre/src/calibre/gui2/update.py
---- calibre.old/src/calibre/gui2/update.py	2011-01-11 22:08:00.684511166 +0100
-+++ calibre/src/calibre/gui2/update.py	2011-01-11 22:11:16.678301138 +0100
-@@ -87,12 +87,12 @@
+--- calibre.old/src/calibre/gui2/update.py	2011-06-26 19:51:17.913975852 +0200
++++ calibre/src/calibre/gui2/update.py	2011-06-26 19:56:50.608665533 +0200
+@@ -121,13 +121,13 @@
  
  class UpdateMixin(object):
  
 -    def __init__(self, opts):
+-        self.last_newest_calibre_version = NO_CALIBRE_UPDATE
 -        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):
++        #self.last_newest_calibre_version = NO_CALIBRE_UPDATE
 +        #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):
-         os = 'windows' if iswindows else 'osx' if isosx else 'linux'
+     def recalc_update_label(self, number_of_plugin_updates):
+         self.update_found('%s%s%d'%(self.last_newest_calibre_version, VSEP,
diff --git a/calibre.spec b/calibre.spec
index 396a967..2949d29 100644
--- a/calibre.spec
+++ b/calibre.spec
@@ -1,7 +1,7 @@
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 Name:           calibre
-Version:        0.8.4
+Version:        0.8.7
 Release:        1%{?dist}
 Summary:        E-book converter and library management
 Group:          Applications/Multimedia
@@ -19,7 +19,7 @@ URL:            http://calibre-ebook.com/
 Source0:        %{name}-%{version}-nofonts.tar.xz
 Source1:        generate-tarball.sh
 Source2:        calibre-mount-helper
-Patch0:		%{name}-manpages.patch
+Patch0:         %{name}-manpages.patch
 Patch1:         %{name}-no-update.patch
 # Patch to fix crash on pdf export (BZ #673604)
 # (use the correct API for the external pyPdf library)
@@ -89,7 +89,7 @@ RTF, TXT, PDF and LRS.
 %patch0 -p1 -b .manpages
 
 # don't check for new upstream version (that's what packagers do)
-%patch1 -F 2 -p1 -b .no-update
+%patch1 -p1 -b .no-update
 
 # fix crash on pdf export (BZ #673604)
 %patch2 -p1 -b .pdf-export-fix
@@ -104,6 +104,7 @@ RTF, TXT, PDF and LRS.
 %{__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
 %{__chmod} -x src/calibre/*/*/*.py
@@ -196,35 +197,12 @@ ln -s %{_datadir}/fonts/liberation/LiberationMono-Regular.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;
-
-%find_lang %{name} --with-qt --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
+# delete locales, calibre stores them in a zip file now
+rm -rf %{buildroot}%{_datadir}/%{name}/localization/locales/
 
 %{__rm} -f %{buildroot}%{_bindir}/%{name}-uninstall   
 
-cp -a %{SOURCE2} %{buildroot}%{_bindir}/
+install -m 755 %{SOURCE2} %{buildroot}%{_bindir}/calibre-mount-helper
 
 %post
 update-desktop-database &> /dev/null ||:
@@ -242,7 +220,7 @@ fi
 %posttrans
 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
-%files -f %{name}.lang
+%files
 %defattr(-,root,root,-)
 %doc COPYRIGHT LICENSE Changelog.yaml
 %{_bindir}/calibre
@@ -260,7 +238,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_bindir}/ebook-viewer
 %{_bindir}/epub-fix
 %{_bindir}/fetch-ebook-metadata
-%{_bindir}/librarything
 %{_bindir}/lrf2lrs
 %{_bindir}/lrfviewer
 %{_bindir}/lrs2lrf
@@ -279,6 +256,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_mandir}/man1/*
 
 %changelog
+* Mon Jun 27 2011 Christian Krause <chkr at fedoraproject.org> - 0.8.7-1
+- Update to 0.8.7
+- Update no-update patch
+- Adapt locales handling to upstream changes
+  (locale files are now placed into a single zip file)
+
 * Sat Jun 04 2011 Kevin Fenzi <kevin at scrye.com> - 0.8.4-1
 - Update to 0.8.4
 
diff --git a/sources b/sources
index dac4525..8d1bfe9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c68d42ed79cf55e5343591b4a7932456  calibre-0.8.4-nofonts.tar.xz
+244db43139bb0b7445491dd74a90c7e3  calibre-0.8.7-nofonts.tar.xz


More information about the scm-commits mailing list