Hello community,

here is the log from the commit of package calibre.1276 for 
openSUSE:12.3:Update checked in at 2013-01-31 16:08:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/calibre.1276 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.calibre.1276.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "calibre.1276", Maintainer is ""

Changes:
--------
New Changes file:

--- /dev/null   2013-01-09 19:40:42.352580873 +0100
+++ /work/SRC/openSUSE:12.3:Update/.calibre.1276.new/calibre.changes    
2013-01-31 16:08:43.000000000 +0100
@@ -0,0 +1,5116 @@
+-------------------------------------------------------------------
+Tue Jan 22 20:53:24 UTC 2013 - [email protected]
+
+- I am unable to trigger bugs with sip 4.14 so removing the
+  restriction. Also just triggering rebuild in obs should fix the
+  issue I think.
+
+-------------------------------------------------------------------
+Fri Jan 18 16:59:03 UTC 2013 - [email protected]
+
+- Add dependency over python-cssselect wrt bnc#788151.
+
+-------------------------------------------------------------------
+Tue Jan 15 10:08:26 UTC 2013 - [email protected]
+
+- Added Requires and BuildRequires for poppler-tools as suggested
+  by Ciaran. Thanks!
+
+-------------------------------------------------------------------
+Mon Jan 14 20:09:44 UTC 2013 - [email protected]
+
+- Symlinked /usr/share/fonts/truetype, so that fonts are found.
+  Workaround for https://bugs.launchpad.net/ubuntu/+source/calibre/+bug/1037168
+- added Requires: python-sip <= 4.13.2, because 4.14 triggers another bug:
+  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616372
+
+-------------------------------------------------------------------
+Thu Jan 10 17:17:19 UTC 2013 - [email protected]
+
+- Add  buildrequires which is not a hard dependency
+- Cleaned up spec file formatting with spec-cleaner
+- Fixed shebangs on python files (rpmlint warning)
+- Provide obsoleted calibre07 (rpmlint warning)
+- Make sure optflags are set properly
+
+-------------------------------------------------------------------
+Fri Jan  4 13:08:02 UTC 2013 - Sascha Manns <[email protected]>
+
+- update to 0.9.13
+- New Features:
+  o Complete rewrite of the PDF Output engine, to support links and fix
+    various bugs
+  o Show disabled device plugins in Preferences->Ignored Devices
+  o Get Books: Fix Smashwords, Google books and B&N stores. Add Nook UK
+    store
+  o Allow series numbers lower than -100 for custom series columns.
+  o Add mass storage driver for rockhip based android smart phones
+  o Add a clear ratings button to the edit metadata dialog 
+- Bug Fixes:
+  o PDF Output: Fix custom page sizes not working on OS X
+  o PDF Output: Fix embedding of many fonts not supported (note that
+    embedding of OpenType fonts with Postscript outlines is still not
+    supported on windows, though it is supported on other operating
+    systems)
+  o PDF Output: Fix crashes converting some books to PDF on OS X
+  o HTML Input: Handle entities inside href attributes when following the
+    links in an HTML file.
+  o Content server: Fix custom icons not used for sub categories
+  o Force use of non-unicode constants in compiled templates. Fixes a
+    problem with regular expression character classes and probably other
+    things.
+  o Kobo driver: Do not error out if there are invalid dates in the device
+    database
+  o Content server: Fix for non-unicode hostnames when using mDNS
+
+-------------------------------------------------------------------
+Tue Dec 25 14:14:58 UTC 2012 - Sascha Manns <[email protected]>
+
+- update to 0.9.11
+- New Features:
+  o Merry Christmas and Happy Holidays to all ☺
+    When connecting to MTP devices such as the Kindle Fire HD or the Nook
+    HD, speed up the process by ignoring some folders.
+  o Allow changing the icons for categories in the Tag Browser. Right
+    click on a category and choose 'Change category icon'.
+  o Allow setting the color of all columns with a single rule in
+  o Preferences->Look & Feel->Column Coloring
+  o MOBI: When reading metadata from mobi files, put the contents of the
+  o ASIN field into an identifier named mobi-asin. Note that this value is
+    not used when downloading metadata as it is not possible to know which
+    (country specific) amazon website the ASIN comes from. 
+- Bug Fixes:
+  o Windows build: Fix a regression in 0.9.9 that caused calibre to not
+    start on some windows system that were missing the VC.90 dlls (some
+    older XP systems)
+  o Kobo driver: Workaround for invalid shelves created by bugs in the
+    Kobo server
+  o Metadata download: Fix cover downloading from non-US amazon sites
+    broken by a website change.
+-------------------------------------------------------------------
+Fri Dec 14 11:31:03 UTC 2012 - Sascha Manns <[email protected]>
+
+- update to 0.9.10
+- New Features:
+  o Drivers for Nextbook Premium 8 se, HTC Desire X and Emerson EM 543 
+- Bug Fixes:
+  o Fix rich text delegate not working with Qt compiled in debug mode.
+  o When deleting all books in the library, blank the book details panel
+  o Conversion: Fix malformed values in the bgcolor attribute causing
+    conversion to abort
+  o Conversion: Fix heuristics applying incorrect style in some
+    circumstances
+  o Possible fix for 64bit calibre not starting up on some Windows systems
+
+-------------------------------------------------------------------
+Sun Dec  9 11:24:37 UTC 2012 - Sascha Manns <[email protected]>
+
+- updated to 0.9.9
+- New Features:
+  o Content server: Make the identifiers in each books metadata
+    clickable 
+- Bug Fixes:
+  o EPUB Input: Fix an infinite loop while trying to recover a damaged
+    EPUB file.
+  o KF8 Input: Fix handling of links in files that link to the obsolete
+    tags instead of tags with an id attribute.
+  o Conversion: Fix a bug in removal of invalid entries from the spine,
+    where not all invalid entries were removed, causing conversion to
+    fail.
+  o KF8 Input: Ignore invalid flow references in the KF8 document instead
+    of erroring out on them.
+  o Fix command line output on linux systems with incorrect LANG/LC_TYPE
+    env vars.
+  o KF8 Input: Fix page breaks specified using the data-AmznPageBreak
+    attribute being ignored by calibre.
+  o PDF Output: Fix custom size field not accepting fractional numbers as
+    sizes
+  o Get Books: Update libre.de and publio for website changes
+  o Wireless driver: Increase timeout interval, and when allocating a
+    random port try 9090 first
+
+-------------------------------------------------------------------
+Fri Nov 30 11:43:08 UTC 2012 - Sascha Manns <[email protected]>
+
+- updated to 0.9.8
+- New Features:
+  o Add an option to show the cover size in the book details panel on the
+    right. Option is in Preferences->Look & Feel->Book Details
+  o Kobo driver: Add support for firmware 2.2. Also add an option to send
+    series information to the device.
+  o Catalogs: Allow using custom columns as the source for Genres when
+    generating catalogs
+  o When the user asks calibre to convert a book, show a small animation
+    to make highlight that the convert job has been queued to run in the
+    background
+  o Add support for the notification center in OS X 10.8
+  o calibredb: Add an option to specify the cover to use when adding books
+    with calibredb add.
+  o EPUB Input: Add support for EPUB files with broken central directory
+    records *and* data descriptors
+  o Comic metadata: Support reading metadata from cbr files. Also read the
+  o comments and published date info from the metadata.
+  o Speed up processing of RAR and CBR files by avoiding an extra file
+    copy
+  o Add driver for Nexus 10 on linux. 
+
+- Bug Fixes:
+  o KF8 Input: Handle invalid KF8 files with links pointing to
+    non-existent locations and incorrect values in the div table.
+  o Viewer: Fix handling of empty self closing tags.
+  o Fix use of {formats} in save to disk templates. Fix some formatter
+    functions causing plugboards to not validate.
+  o Fix calibre quitting when minimized to system tray and an update
+    available message is shown and then closed.
+  o Viewer: Fix vertical margin at the top of the first page of a chapter
+    incorrect in a certain rare circumstance (first child of body being an
+    empty paragraph).
+  o E-book viewer: Fix bug that caused the default language for
+    hyphenation to be ignored for books that do not specify a language
+
+-------------------------------------------------------------------
+Mon Nov 26 09:24:50 UTC 2012 - Sascha Manns <[email protected]>
+
+- updated to 0.9.7
+- New Features:
+  o Edit metadata dialog: Show the size of the current book cover in the
+    edit metadata dialog.
+  o Get Books: Allow easy searching by title and author in addition to any
+    keyword, to prevent large numbers of spurious matches.
+  o An option to automatically convert any added book to the current
+    output format, found under Preferences->Adding books
+  o E-book viewer: Allow viewing tables in a separate popup window by
+    right clicking on the table and selecting 'View table'. Useful for
+    reference books that have lots of large tables.
+  o Catalogs: Add the current library name as an available field when
+    generating catalogs in csv/xml format.
+  o Enable colored text in the output from the command line tools on
+    windows
+  o E-book viewer: Add an option to hide the help message when entering
+    full screen mode
+  o E-book viewer: Add an option to always start the viewer in full screen
+    mode
+  o E-book viewer: Add many more controls to the context menu,
+    particularly useful in full screen mode
+  o E-book viewer: Allow easy searching of the selected word or phrase in
+    google via the context menu
+  o Add a new type of FileType plugin, postimport, that runs after a book
++++ 4919 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.3:Update/.calibre.1276.new/calibre.changes

New:
----
  calibre-0.9.13-nofonts.tar.bz2
  calibre-cssselect-0.7.1.tar.gz
  calibre-no-update.diff
  calibre-rpmlintrc
  calibre-setup.install.py.diff
  calibre.changes
  calibre.desktop
  calibre.png
  calibre.spec
  generate-tarball.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ calibre.spec ++++++
#
# spec file for package calibre
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Summary:        EBook Management Application
License:        GPL-3.0
Group:          Productivity/Other

Name:           calibre
Version:        0.9.13
Release:        0
Url:            http://calibre-ebook.com
# Getting and modifying the sources
#----------------------------------
# Do not use unmodified upstream sources, since they contain proprietary
# fonts which we are not allowed to distribute. Furthermore, the Liberation
# fonts, which are available as a separate package, are also included. Call
# sh generate-tarball.sh <VERSION>
# which downloads the sources, deletes the fonts and repacks it to
# calibre-$VERSION-nofonts.tar.bz2
Source0:        %{name}-%{version}-nofonts.tar.bz2
Source2:        %{name}.desktop
Source3:        %{name}.png
Source4:        generate-tarball.sh

%if 0%{?suse_version} == 1220
Source5:        %{name}-cssselect-0.7.1.tar.gz
%endif

Patch2:         %{name}-setup.install.py.diff
Patch3:         %{name}-no-update.diff
Obsoletes:      calibre07 < %{version}
Provides:       calibre07 = %{version}

#If a package is obsoleted by a compatible replacement, the obsoleted package
#should also be provided in order to not cause unnecessary dependency breakage.
#If the obsoleting package is not a compatible replacement for the old one,
#leave out the Provides.
#Provides:      calibre07

#
# A note on BuildRequires and Requires:
#
# Requires should always be a subset of BuildRequires. If there are packages
# that are only Required
# * there is no way to check whether these packages are available in the given
#   repositories unless you install the package (the build environment only
#   contains packages from the given repositories and the project
# * the project's repository might become inconsistent, because Required
#   packages do not block a build. So a package might get published, although
#   a Required package does not build

BuildRequires:  chmlib-devel >= 0.40
BuildRequires:  fdupes
BuildRequires:  help2man
BuildRequires:  liberation-fonts
BuildRequires:  libicu-devel >= 4.4.0
BuildRequires:  libmtp-devel
BuildRequires:  libpodofo-devel
BuildRequires:  libpoppler-qt4-devel >= 0.12.0
BuildRequires:  libqt4-devel >= 4.6.0
BuildRequires:  libqt4-private-headers-devel
BuildRequires:  libwmf-devel >= 0.2.8
BuildRequires:  podofo >= 0.8.2
BuildRequires:  poppler >= 0.12.0
BuildRequires:  poppler-tools
BuildRequires:  python >= 2.7.1
BuildRequires:  python-beautifulsoup >= 3.0.5
BuildRequires:  python-cherrypy
BuildRequires:  python-cssutils >= 0.9.9
BuildRequires:  python-cssselect >= 0.7.1
BuildRequires:  python-dateutil >= 1.4.1
BuildRequires:  python-devel >= 2.7.1
BuildRequires:  python-dnspython >= 1.6.0
# python-genshi is a required package, see above
BuildRequires:  python-genshi
BuildRequires:  python-imaging >= 1.1.6
BuildRequires:  python-lxml >= 2.2.1
BuildRequires:  python-mechanize >= 0.1.11
BuildRequires:  python-odfpy
BuildRequires:  python-pypdf
BuildRequires:  python-qt4-devel >= 4.9.1
BuildRequires:  python-setuptools
BuildRequires:  python-sip-devel >= 4.12
BuildRequires:  sqlite3-devel
BuildRequires:  update-desktop-files
BuildRequires:  xdg-utils >= 1.0.2
BuildRequires:  pkgconfig(ImageMagick) >= 6.5.9

Requires:       ImageMagick >= 6.5.9
Requires:       chmlib >= 0.40
Requires:       dbus-1-python
Requires:       liberation-fonts
Requires:       libicu >= 4.4
Requires:       libmtp9
Requires:       libqt4 >= 4.6.0
Requires:       libwmf >= 0.2.8
Requires:       podofo >= 0.8.2
Requires:       poppler-qt4 >= 0.12.0
Requires:       poppler-tools
Requires:       python >= 2.7.1
Requires:       python-beautifulsoup >= 3.0.5
Requires:       python-cherrypy
Requires:       python-cssutils >= 0.9.9
Requires:       python-cssselect >= 0.7.1
Requires:       python-dateutil >= 1.4.1
Requires:       python-dnspython >= 1.6.0
Requires:       python-genshi
Requires:       python-imaging >= 1.1.6
Requires:       python-lxml >= 2.2.1
Requires:       python-mechanize >= 0.1.11
Requires:       python-netifaces
Requires:       python-odfpy
Requires:       python-pypdf
Requires:       python-qt4 >= 4.7.0
Requires:       python-setuptools
Requires:       python-sip >= 4.12.1
Requires:       sqlite3
Requires:       xdg-utils >= 1.0.2

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{py_requires}
# http://lists.opensuse.org/opensuse-packaging/2009-08/msg00110.html

%description
Calibre is an ebook library manager. It can view, convert and catalog
ebooks in most of the major ebook formats. It can also talk to a few
ebook reader devices. It can go out to the internet and fetch
metadata for your books. It can download newspapers and convert them
into ebooks for convenient reading. It is cross platform, running on
Linux, Windows and OS X.

%prep
%setup -q -n %{name}
%patch2 -p1
%patch3 -p1 -b .no-update

# dos2unix newline conversion
sed -i 's/\r//' src/calibre/web/feeds/recipes/*

# remove the executable flag from files
find src/calibre -name "*.py" -type f  | xargs chmod -x
chmod -x recipes/*

cp -v %{SOURCE2} %{SOURCE3}  .

# Add cssselect private code, only for opensuse 12.2
%if 0%{?suse_version} == 1220
tar xzf %{SOURCE5} -C $RPM_BUILD_DIR/%{name}/src/ --strip-components=1 
cssselect-0.7.1/cssselect/
%endif

%build
#export CFLAGS="$CFLAGS %%{optflags}"
#OVERRIDE_CFLAGS="%% { optflags } -fno-strict-aliasing"
LANG="en_US.UTF8" \
CFLAGS="%{optflags} -fno-strict-aliasing" \
CXXFLAGS="%{optflags} -fno-strict-aliasing" \
python setup.py build
pushd src/calibre/devices
make linux_mount_helper
popd

%install
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d/
mkdir -p %{buildroot}%{_datadir}/qt4/translations/

python setup.py install \
   --prefix=%{_prefix} \
   --root=%{buildroot} \
   --staging-bindir=%{buildroot}%{_bindir} \
   --staging-libdir=%{buildroot}%{_libdir} \
   --staging-sharedir=%{buildroot}%{_datadir} \
   --staging-mandir=%{buildroot}%{_mandir} \
   --libdir=%{_libdir}

%suse_update_desktop_file -i -n calibre Office Viewer

%fdupes %{buildroot}
# %%fdupes %%{buildroot}%%{_datadir}/%%{name}/

# packages aren't allowed to register mimetypes like this
rm -f %{buildroot}%{_datadir}/applications/defaults.list

# 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

# delete /usr/share/calibre/fonts/liberation
# replace it by a symlink to /usr/share/fonts/truetype/
rmdir $RPM_BUILD_ROOT/usr/share/calibre/fonts/liberation
ln -s /usr/share/fonts/truetype/ 
$RPM_BUILD_ROOT/usr/share/calibre/fonts/liberation

# add shebangs
sed -i -e '1i#!/usr/bin/python' %{buildroot}%{_libdir}/%{name}/chardet/*.py

%clean
[ %{buildroot} != "/" ] && [ -d %{buildroot} ] && rm -rf %{buildroot}

%files
# -f %%{name}.lang  -f iso639.lang
%defattr(-,root,root)
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/%{name}/
%{_bindir}/*
%exclude %{_bindir}/calibre-uninstall
%{_libdir}/%{name}/
%config %{_sysconfdir}/bash_completion.d/%{name}

%changelog
++++++ calibre-no-update.diff ++++++
Index: calibre/src/calibre/gui2/ui.py
===================================================================
--- calibre.orig/src/calibre/gui2/ui.py 2012-06-08 07:17:56.000000000 +0200
+++ calibre/src/calibre/gui2/ui.py      2012-06-12 20:44:24.116576257 +0200
@@ -744,7 +744,8 @@ class Main(MainWindow, MainWindowMixin,
         if write_settings:
             self.write_settings()
         self.check_messages_timer.stop()
-        self.update_checker.terminate()
+        if self.update_checker:
+            self.update_checker.terminate()
         self.listener.close()
         self.job_manager.server.close()
         self.job_manager.threaded_server.close()
Index: calibre/src/calibre/gui2/update.py
===================================================================
--- calibre.orig/src/calibre/gui2/update.py     2012-06-08 07:17:56.000000000 
+0200
+++ calibre/src/calibre/gui2/update.py  2012-06-12 20:44:24.116576257 +0200
@@ -122,11 +122,11 @@ 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()
+        #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 recalc_update_label(self, number_of_plugin_updates):
         self.update_found('%s%s%d'%(self.last_newest_calibre_version, VSEP,
++++++ calibre-rpmlintrc ++++++
# # Output filters 
addFilter("non-executable-script")
addFilter("no-manual-page-for-binary")
addFilter("unstripped-binary-or-object")
addFilter("explicit-lib-dependency")
++++++ calibre-setup.install.py.diff ++++++
Index: calibre/setup/install.py
===================================================================
--- calibre.orig/setup/install.py       2012-06-08 07:17:56.000000000 +0200
+++ calibre/setup/install.py    2012-06-12 20:44:24.091577428 +0200
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
 from __future__ import with_statement
 
@@ -76,11 +77,13 @@ class Develop(Command):
         opts = self.opts
         if not opts.prefix:
             opts.prefix = sys.prefix
-        for x in ('prefix', 'libdir', 'bindir', 'sharedir', 'staging_root',
-                'staging_libdir', 'staging_bindir', 'staging_sharedir'):
+        for x in ('prefix', 'libdir', 'bindir', 'sharedir', 'mandir',
+                      'staging_root', 'staging_libdir',
+                      'staging_bindir', 'staging_sharedir', 'locale_dir'):
             o = getattr(opts, x, None)
             if o:
                 setattr(opts, x, os.path.abspath(o))
+        self.info( "****", opts, self )
         self.libdir = getattr(opts, 'libdir', None)
         if self.libdir is None:
             self.libdir = self.j(opts.prefix, 'lib')
@@ -88,8 +91,12 @@ class Develop(Command):
         if self.bindir is None:
             self.bindir = self.j(opts.prefix, 'bin')
         self.sharedir = getattr(opts, 'sharedir', None)
+        self.mandir = getattr(opts, 'mandir', None)
+        if self.mandir is None:
+            self.mandir = self.j(opts.prefix, 'share')
         if self.sharedir is None:
             self.sharedir = self.j(opts.prefix, 'share')
+
         if not getattr(opts, 'staging_root', None):
             opts.staging_root = opts.prefix
         self.staging_libdir = getattr(opts, 'staging_libdir', None)
@@ -101,9 +108,17 @@ class Develop(Command):
         self.staging_sharedir = getattr(opts, 'staging_sharedir', None)
         if self.staging_sharedir is None:
             self.staging_sharedir = opts.staging_sharedir = 
self.j(opts.staging_root, 'share')
+        self.staging_mandir = getattr(opts, 'staging_mandir', None)
+        if self.staging_mandir is None:
+            self.staging_mandir = opts.staging_mandir = 
self.j(opts.staging_root, 'man')
+        self.staging_localedir = getattr(opts, 'staging_localedir', None)
+        if self.staging_localedir is None:
+            self.staging_localedir = opts.staging_localedir = 
self.j(opts.staging_root, 'usr/share/locale')
 
         self.staging_libdir = opts.staging_libdir = 
self.j(self.staging_libdir, 'calibre')
         self.staging_sharedir = opts.staging_sharedir = 
self.j(self.staging_sharedir, 'calibre')
+        self.staging_mandir = opts.staging_mandir = 
self.j(self.staging_mandir, '')
+        self.staging_localedir = opts.staging_localedir = 
self.j(self.staging_localedir, '')
 
         if self.__class__.__name__ == 'Develop':
             self.libdir = self.SRC
@@ -114,6 +129,8 @@ class Develop(Command):
             self.info('INSTALL paths:')
             self.info('\tLIB:', self.staging_libdir)
             self.info('\tSHARE:', self.staging_sharedir)
+            self.staging_mandir =self.j(self.mandir, '')
+            # self.mandir = self.j(opts.staging_root, 'man')
 
 
     def pre_sub_commands(self, opts):
@@ -245,6 +262,11 @@ class Install(Develop):
                     'the launcher scripts. This option controls the prefix '
                     'to which the install will actually copy files. By default 
'
                     'it is set to the value of --prefix.'))
+        parser.add_option('--staging-mandir',
+            help='Where to put the calibre manpage files. Default is 
<root>/man')
+        parser.add_option('--staging-locale-dir',
+            dest="staging_localedir",
+            help="Where to put the calibre locale files. Default is 
<root>/share/locale")
         parser.add_option('--staging-libdir',
             help='Where to put calibre library files. Default is <root>/lib')
         parser.add_option('--staging-bindir',
@@ -253,6 +275,50 @@ class Install(Develop):
             help='Where to put the calibre data files. Default is 
<root>/share')
         self.add_postinstall_options(parser)
 
+    def install_localefiles(self):
+      """Install the .mo files"""
+      #if not self.locale_dir.startswith( sys.prefix ):
+      #  # We don't want to disturb installation when option --locale-dir is 
not set
+      #  return
+      locale = os.path.join(self.RESOURCES, "localization/locales")
+      dest = self.staging_localedir
+      self.info("Installing locale files...")
+      self.info("*** locale_dir:", dest)
+      self.info("*** SRC:", self.SRC)
+      self.info("*** DEST:", dest)
+      if not os.path.exists(dest):
+        os.makedirs(dest)
+      for lang in os.listdir( locale ):
+        j = os.path.join(locale, lang)
+        dd = os.path.join(dest, lang)
+        if os.path.exists(dd):
+            shutil.rmtree(dd)
+        lc_message_dest = os.path.join(dest, lang, 'LC_MESSAGES')
+        lc_message = os.path.join(locale, lang, "LC_MESSAGES")
+        self.info("Creating locale directory %s " % lc_message_dest)
+        os.makedirs( lc_message_dest )
+        filedict = { 
+           'iso639.mo': 'iso639.mo',
+           'messages.mo': 'calibre.mo',
+           'qt.qm': '',
+          }
+        for f in os.listdir(lc_message):
+          destfile = filedict.get(f)
+          if destfile != '':
+            self.info("Moving %s -> %s" % (lang, dd))
+            shutil.move(os.path.join(lc_message, f), 
+                        os.path.join(dest, lang, 'LC_MESSAGES', destfile ))
+
+        
+        #shutil.move(os.path.join(locale,i), dest)
+        # Rename that beast:
+        #shutil.move(os.path.join(dest, i, 'LC_MESSAGES/messages.mo'),
+        #            os.path.join(dest, i, 'LC_MESSAGES/calibre.mo'))
+        #os.remove( os.path.join(dest, i, 'LC_MESSAGES/qt.qm' )
+        #shutil.copytree(j, dd )
+      shutil.rmtree(os.path.join(self.RESOURCES, "localization/locales") )
+
+
     def install_files(self):
         dest = self.staging_libdir
         if os.path.exists(dest):
@@ -270,7 +336,11 @@ class Install(Develop):
         dest = self.staging_sharedir
         if os.path.exists(dest):
             shutil.rmtree(dest)
+        
+#        self.install_localefiles()
         self.info('Installing resources to', dest)
+
+        
         shutil.copytree(self.RESOURCES, dest)
         self.manifest.append(dest)
 
++++++ calibre.desktop ++++++
[Desktop Entry]
Encoding=UTF-8
Name=calibre
GenericName=Ebook reader
Comment=Ebook reader
TryExec=calibre
Exec=calibre %F
StartupNotify=true
Terminal=false
Type=Application
Icon=calibre.png
Categories=Office;Viewer
++++++ generate-tarball.sh ++++++
#!/bin/sh
#
# Copyright (c) 2010,2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# Authors: Sascha Manns <[email protected]>
#          Frank Sundermeyer <[email protected]>
#
# Downloads the latest source file for Calibre from
# http://status.calibre-ebook.com/dist/src
# Unpacks the sources to a temporary directory, removes
# fonts (proprietary ons and Liberation) and repacks it
# to calibre-$VERSION-nofonts.tar.bz2 in the current directory

#----------
# Functions
#----------

# usage

function usage {
                 echo -e "\nusage: $0 VERSION\n"
                 echo -e "Downloads the latest source file for Calibre from"
                 echo -e "http://status.calibre-ebook.com/dist/src";
                 echo -e "Unpacks the sources to a temporary directory, removes"
                 echo -e "fonts (proprietary and Liberation) and repacks it"
                 echo -e "to calibre-$VERSION-nofonts.tar.bz2 in $(pwd)"
                 exit 1
}
function exit_on_error {
    echo -e "$1"
    [[ -e ${MYTEMP} ]] && rm -rf ${MYTEMP}
    exit 1
}

VERSION=$1
[ -z $VERSION ] && usage

MYTEMP=$(mktemp -dq) || exit_on_error "Error: Could not create tmp directory"

trap exit 0 SIGTERM SIGINT

#-----
# Main
#-----

cd $MYTEMP || exit_on_error "Error: Could not cd into $MYTEMP"
#
echo -n "Downloading .... "
# wget -q http://status.calibre-ebook.com/dist/src
curl -L http://status.calibre-ebook.com/dist/src > calibre-$VERSION.tar.xz
echo "done"
#
echo -n "Processing archive ... "
[ -e calibre-$VERSION.tar.xz ] || exit_on_error "Error: Calibre Archiv not 
found"
tar -xJf calibre-$VERSION.tar.xz
[ -e calibre/resources/fonts/liberation ] && rm -f 
calibre/resources/fonts/liberation/*
[ -e calibre/resources/fonts/prs500 ] && rm -f calibre/resources/fonts/prs500/*
echo "done"
cd - > /dev/null
#
echo -n "Creating new archive calibre-$VERSION-nofonts.tar.bz2 ... "
tar -c -f calibre-$VERSION-nofonts.tar.bz2 -C ${MYTEMP} -j calibre
echo "done"
#
echo -n "Cleaning up ... "
rm -rf $MYTEMP
echo "done"
#
echo -n "Adding calibre-$VERSION-nofonts.tar.bz2 to OBS ... "
echo
osc add $(pwd)/calibre-$VERSION-nofonts.tar.bz2
echo "done"
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to