Hello community,
here is the log from the commit of package calibre for openSUSE:Factory
checked in at Mon Jul 5 18:51:33 CEST 2010.
--------
New Changes file:
--- /dev/null 2010-05-08 11:31:08.000000000 +0200
+++ calibre/calibre.changes 2010-05-16 20:01:10.000000000 +0200
@@ -0,0 +1,641 @@
+-------------------------------------------------------------------
+Sun May 16 17:59:29 UTC 2010 - saigkill@opensuse.org
+
+- changed BuildRequires to newer podofo version
+
+-------------------------------------------------------------------
+Sun May 16 15:25:48 UTC 2010 - saigkill@opensuse.org
+
+- update to version 0.6.53
+- New Features
+ o Clean up GUI initialization and add support for restoring corrupted databases automatically
+ ö Make proxy detection more robust on windows and OS X. calibre now queries OS X Network Settigns if no environment variables are set. Also handle proxies with a trailing slash correctly
+ o Add EPUB advanced formatting demo to User Manual
+ o Support for the Booq Avant, Azbooka and the Samsung GT-I5700
+ o Backwards search in the E-book viewer
+ o calibredb: Add ability to create empty books in the database.
+ o Conversion pipeline: Support for the :first-letter pseudo selector
+ o Interpret a Keyboard interrupt (Ctrl+C) as a request to quit the main GUI
+ o CBC Input: Handle comics.txt encoded in UTF-16 with a BOM
+- Bug Fixes
+ o HTML Input: Fix silly bug in case sensitivity detection
+ o Kobo driver: Show all sideloaded content on the device.
+ o EPUB metadata: Fix bug with relative apths in encryption detection when reading cover
+ o E-book viewer: Fix next page scrolling when current document is just a little more than a screenfull. Also use a more robust method to insert blank space at the end of the document when the last screenfull is partially empty.
+ o EPUB metadata: Allow deletion of series/tags/isbn from EPUB files when Saving to Disk
+ o Fix regression that caused temporary blank line at the bottom of the books list when adding duplicates
+ o Add icon for RTF
+ o Amazon metadata: If ISBN is not found, don't report an error message.
+ o EPUB Input: Fix typo that caused incorrect processing of EPUB files with more than one identifier element and encrypted fonts
+ o Fix bug that caused send to device to send multiple copies to the device if you had previously used Prefrences
+ o Linux prs 500 udev rule: Use SUBSYSTEMS instead of the deprecated BUS
+ o PML2PMLZ plugin: Actually compress the PML file stored in the PMLZ archive
+ o SONY drivers: Fix regression that broke collection ordering by series when sending to device. And fix another rare error condition.
+ o CHM Input: Regression that broke CHM conversion on OS X.
+ o Fix PDB created in Dropbook not convertable by Calibre
+
+-------------------------------------------------------------------
+Tue May 11 06:12:49 UTC 2010 - toms@suse.de
+
+- Fixed man problem (again)
+- Merged %exclude pattern for calibre-uninstall from hgraeber
+
+-------------------------------------------------------------------
+Sat May 8 09:34:39 UTC 2010 - saigkill@opensuse.org
+
+- updated to Version 0.6.52
+- New Features
+ + Support for the Kobo Reader and the HTC Desire
+ + PDB Input: Add support for PDB files created with incorrect encodings
+ + EPUB Output: Make the file size splitting algorithm more intelligent. If a split results in a tree that is very small, choose another split point.
+ + Add an entry to the Fetch News menu to fetch all scheduled news
+ + MOBI Output: When inserting metadata, hide the searchable version of the tags (append with ttt). They are still searchable, but not visible.
+
+- Bug Fixes
+ + HTML Input: Handle case sensitive file systems on OS X
+ + EPUB Output: When rescaling PNG images, write out the rescaled data in PNG format as ADE cannot handle JPEG data in a PNG file
+ + SONY drivers: Fix corner case that could cause errors when transferring books with series to the device.
+ + Allow users to set the content server port to < 1025 (system ports) with a warning.
+ + Don't popup an error message when adding books if the cover is not a valid image
+ + SONY drivers: Fix bug that prevented detection SD cards that had the Sony Reader/database folders, but no cache.xml
+ + EPUB Input: Handle invalid EPUB files that have manifest entries pointing to non existent files
+ + Fix the get cover/metadata from specific format buttons when the user has chosen to read metadata only from filenames
+ + Conversion pipeline: More robust conversion of HTML tags to text when detecting structure
+ + Fix 'Open containing folder' does not work if the path name contains '#'
+
+-------------------------------------------------------------------
+Wed May 5 07:25:00 UTC 2010 - toms@suse.de
+
+SPEC:
+- Corrected packager in calibre/src/calibre/utils/help2man.py
+ from bz2 -> gzip
+- "Renamed" file *.patch -> *.diff
+
+-------------------------------------------------------------------
+Mon May 3 21:20:54 UTC 2010 - saigkill@opensuse.org
+
+- fixed rpmlint Errors (Manpage bz2 Errors)
+- disabled automatic information service
+
+-------------------------------------------------------------------
+Sun May 2 04:44:35 UTC 2010 - saigkill@opensuse.org
+
+- Updated to Version 0.6.51
+- fixed broken build of openSUSE 11.1
+
+-------------------------------------------------------------------
+Wed Apr 28 12:29:52 UTC 2010 - toms@suse.de
+
+- Dealing with locale problems:
+ . Fixed locale files: Use /usr/share/locale/LANG/LC_MESSAGE
+ instead of /usr/share/calibre/...
+ . Renamed locale messages.mo -> calibre.mo
+ . Removed qt.qm. Depends on /usr/share/qt4/translations/qt_LANG.qm now
+
+TODO: Fix manpage warnings
+
+-------------------------------------------------------------------
+Tue Apr 27 11:14:00 UTC 2010 - saigkill@opensuse.org
+
+- updated to version 0.6.49
+- changed tar.gz -> tar.bz2
+
+-------------------------------------------------------------------
+Tue Apr 20 06:30:30 UTC 2010 - toms@suse.de
+
+- tar.gz -> .tar.bz2
+
+-------------------------------------------------------------------
+Mon Apr 19 15:57:35 UTC 2010 - saigkill@opensuse.org
+
+- Updated to Version 0.6.48
+- Added lang Package
+- fixed some rpmlint Issues
+
+-------------------------------------------------------------------
+Sat Mar 13 21:32:13 UTC 2010 - toms@suse.de
+
+- Update 0.6.45 (11 Mar, 2010)
+ New Features
+ * Option for more aggressive duplicates detection when adding books
+ Closes tickets: 5016
+ "There is now an option in Preferences->Add/Save that will cause
+ calibre to try to detect duplicates based on title and author
+ similarity. If a duplicate is found, calibre will automatically
+ merge files intot he existing entry, instead of creating a new one."
+ * Support for setting metadata in Topaz files and getting pdf
+ anntations from a Kindle
+ * ODT Input: Fix handling of mixed ordered and un-ordered lists
+ * Support for the Samsung Moment
+ Closes tickets: 5077
+
+ Bug Fixes
+ * Fix generated list of formats when generating catalog in CSV format
+ Closes tickets: 5092
+ * CHM metadata: Fix unicode handling
+ Closes tickets: 5080
+ * Iriver story driver: Put uploads into the Books directory
+ * Improved iRex DR800 support
+ Closes tickets: 5082
+ * When creating ZIP/EPUB files encode all file names in UTF-8 and set
+ the UTF-8 bit marker. When extracting from a ZIP/EPUB file, if the
+ UTF-8 bit marker is not set, still assume that the file name is
+ encoded in UTF-8. If UTF-8 decoding fails try to detect character
+ encoding using chardet. This is because most ZIP/EPUB files calibre
+ comes across seem to be utf-8 encoded.
+
+ New news sources
+ * TAZ DigiABO by Lars Jacob
+ * Elsevier.nl by Darko Miletic
+ * News Observer by Krittika Goyal
+ * Comics.com by Starson17
+
+
+-------------------------------------------------------------------
+Thu Feb 4 20:53:58 UTC 2010 - toms@suse.de
+
+- Update 0.6.37 (01 Feb, 2010)
+ New Features
+ * E-book viewer: Add support for viewing SVG images
+ * Add category of Recently added books when generating catalog in e-book format
+ * OS X: Allow adding of books to calibre via drag and drop on the calibre dock icon
+ * Add support for masthead images when downloading news for the Kindle
+ * MOBI metadata: Allow setting of metadata in old PRC files without EXTH headers as well
+
+ Bug Fixes
+ * Changing the date in Dutch
+ Closes tickets: 4732
+ * Fix regression that broke sending files to unupdated PRS 500s
+ * MOBI Input: Ignore width and height percentage measures for <img> tags.
+ Closes tickets: 4726
+ * EPUB Output: Remove <img> tags that point to the internet for their
+ images as this causes the ever delicate ADE to crash.
+ Closes tickets: 4692
+ * Comic Input: Handle UTF-8 BOM file names
+ Closes tickets: 4721
+ * Fix bug preventing the the use of indices when setting save tn title as text optional
+ * Fix error while sending book with non-ascii character in title/author to device on linux
+ Closes tickets: 4690
+ * Fix reset cover in edit meta information dialog does not actually remove cover
+ Closes tickets: 4731
+
+ New news sources
+ * Kamera Bild by Darko Miletic
+ * The Online Photographer by Darko Miletic
+ * The Luminous Landscape by Darko Miletic
+ * Slovo by Abelturd
+ * Various Danish newspapers by Darko Miletic
+ * Heraldo de Aragon by Lorenzo Vigentini
+ * Orange County Register by Lorenzi Vigentini
+ * Open Left by Xanthan Gum
+ * Michelle Malkin by Walt Anthony
+ * The Metro Montreal by Jerry Clapperton
+ * The Gazette by Jerry Clapperton
+ * Macleans Magazine by Nick Redding
+ * NY Time Sunday Book Review by Krittika Goyal
+ * Various Italian newspapers by Lorenzo Vigentini
+
++++ 444 more lines (skipped)
++++ between /dev/null
++++ and calibre/calibre.changes
calling whatdependson for head-i586
New:
----
calibre-0.6.53.tar.bz2
calibre-l18n.diff
calibre-no-update-manpage.diff
calibre-rpmlintrc
calibre-setup.install.py.diff
calibre.changes
calibre.desktop
calibre.png
calibre.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ calibre.spec ++++++
#
# spec file for package calibre (Version 0.6.53)
#
# Copyright (c) 2010 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
Name: calibre
Version: 0.6.53
Release: 1
Source0: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
Source2: %{name}.desktop
Source3: %{name}.png
Patch0: %{name}-setup.install.py.diff
Patch1: %{name}-l18n.diff
Patch2: %{name}-no-update-manpage.diff
License: GPL3
Group: Productivity/Other
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: update-desktop-files
BuildRequires: python-devel python-qt4-devel >= 4.5.0
BuildRequires: python-setuptools python-sip-devel
BuildRequires: python-dateutil >= 1.4.1
BuildRequires: help2man libqt4-devel >= 4.6.0
#BuildRequires: libpodofo0_6_99-devel podofo
BuildRequires: libpodofo-devel podofo
BuildRequires: python-beautifulsoup >= 3.0.5
BuildRequires: python-mechanize >= 0.1.11
BuildRequires: chmlib-devel >= 0.40
BuildRequires: python-lxml >= 2.1.5
BuildRequires: python-imaging >= 1.1.6
BuildRequires: python-cssutils >= 0.9.7a2
BuildRequires: libwmf-devel >= 0.2.8
#BuildRequires: libpoppler-qt4-devel >= 0.12.0 libpoppler >= 0.12.0 poppler
BuildRequires: libpoppler-qt4-devel >= 0.12.0 libpoppler5 >= 0.12.0 poppler
BuildRequires: ImageMagick-devel fdupes xdg-utils
# python-dnspython
Requires: python-imaging dbus-1-python python-lxml python-mechanize
Requires: python-beautifulsoup python-dateutil hal
Requires: python-cssutils
Requires: python-setuptools
Requires: xdg-utils
# %{py_requires}
# Vendor: Kovid Goyal
Url: http://calibre-ebook.com
# 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.
Author
------
Kovid Goyal
%prep
%setup -q -n %{name}
%patch0 -p1
%patch1 -p1
%patch2 -p1
# Fix line endings to avoid rpmlint warning:
#find -name "*.py" | xargs sed -i 's/\r//'
%{__cp} -v %{S:2} %{S:3} .
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%{__python} setup.py build
%install
%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/ \
$RPM_BUILD_ROOT/usr/share/qt4/translations/ \
# $RPM_BUILD_ROOT%{_mandir}/man1
%{__python} setup.py install \
--prefix=%{_prefix} \
--root=$RPM_BUILD_ROOT \
--staging-bindir=$RPM_BUILD_ROOT%{_bindir} \
--staging-libdir=$RPM_BUILD_ROOT%{_libdir} \
--staging-sharedir=$RPM_BUILD_ROOT%{_datadir} \
--staging-mandir=$RPM_BUILD_ROOT%{_mandir} \
--libdir=%{_libdir}
# --record=%{name}.files \
# --record-rpm=%{name}.files
%suse_update_desktop_file -i -n calibre Office Viewer Literature
%find_lang %{name}
%find_lang iso639
# Fix udev rules
if [ -e $RPM_BUILD_ROOT/lib/udev/rules.d/95-calibre.rules ]; then
pushd $RPM_BUILD_ROOT
%{__mv} ./lib/udev/rules.d/95-calibre.rules \
./%{_sysconfdir}/udev/rules.d/
%{__rm} -rf ./lib/udev/
popd
fi
# Remove any remaining executable bits to avoid rpmlint warnings
pushd $RPM_BUILD_ROOT%{_libdir}/%{name}/
for i in $(find -type f -name *.py); do
%{__chmod} -x $i
done
popd
%fdupes $RPM_BUILD_ROOT%{_libdir}/%{name}/
%fdupes $RPM_BUILD_ROOT%{_datadir}/%{name}/
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %{__rm} -rf $RPM_BUILD_ROOT
#
%files -f %{name}.lang -f iso639.lang
%defattr(-,root,root)
%config %{_sysconfdir}/bash_completion.d/%{name}
%config %{_sysconfdir}/udev/rules.d/95-calibre.rules
%dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/rules.d/
%{_bindir}/*
%exclude %{_bindir}/calibre-uninstall
%{_libdir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/%{name}/
%if 0%{?suse_version} == 1110
%{_datadir}/locale/*/LC_MESSAGES/calibre.mo
%endif
%{_mandir}/man1/*
#%files -f %{name}.lang
%changelog
++++++ calibre-l18n.diff ++++++
diff -u '--exclude=*_ui.py' '--exclude=*.so' -r calibre.bak/src/calibre//translations/dynamic.py calibre/src/calibre//translations/dynamic.py
--- calibre.bak/src/calibre//translations/dynamic.py 2010-04-23 22:11:59.000000000 +0200
+++ calibre/src/calibre//translations/dynamic.py 2010-04-28 14:08:54.000000000 +0200
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
'''
Dynamic language lookup of translations for user-visible strings.
'''
@@ -8,8 +9,7 @@
import os
from gettext import GNUTranslations
-from calibre.utils.localization import get_lc_messages_path
-
+from calibre.utils.localization import get_lc_messages_path, CALIBRE_MO
__all__ = ['translate']
_CACHE = {}
@@ -21,7 +21,7 @@
else:
mpath = get_lc_messages_path(lang)
if mpath is not None:
- p = os.path.join(mpath, 'messages.mo')
+ p = os.path.join(mpath, CALIBRE_MO)
if os.path.exists(p):
trans = GNUTranslations(open(p, 'rb'))
_CACHE[lang] = trans
diff -u '--exclude=*_ui.py' '--exclude=*.so' -r calibre.bak/src/calibre//utils/localization.py calibre/src/calibre//utils/localization.py
--- calibre.bak/src/calibre//utils/localization.py 2010-04-23 22:11:59.000000000 +0200
+++ calibre/src/calibre//utils/localization.py 2010-04-28 14:48:20.000000000 +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
@@ -9,6 +10,7 @@
import os, locale, re, cStringIO, cPickle
from gettext import GNUTranslations
+CALIBRE_MO = "calibre.mo"
_available_translations = None
def available_translations():
@@ -45,7 +47,11 @@
return lang
def messages_path(lang):
- return P('localization/locales/%s/LC_MESSAGES'%lang)
+ # return P('localization/locales/%s/LC_MESSAGES'%lang)
+ return '/usr/share/locale/%s/LC_MESSAGES' % lang
+
+def qt_message_path(lang):
+ return '/usr/share/qt4/translations'
def get_lc_messages_path(lang):
hlang = None
@@ -75,7 +81,7 @@
mpath = get_lc_messages_path(lang)
if mpath is not None:
if buf is None:
- buf = open(os.path.join(mpath, 'messages.mo'), 'rb')
+ buf = open(os.path.join(mpath, CALIBRE_MO), 'rb')
mpath = mpath.replace(os.sep+'nds'+os.sep, os.sep+'de'+os.sep)
isof = os.path.join(mpath, 'iso639.mo')
if os.path.exists(isof):
@@ -138,9 +144,9 @@
if lang is not None:
if lang == 'nds':
lang = 'de'
- mpath = get_lc_messages_path(lang)
- if mpath is not None:
- p = os.path.join(mpath, 'qt.qm')
+ qtpath = qt_message_path(lang)
+ if qtpath is not None:
+ p = os.path.join(qtpath, 'qt_%s.qm' % lang)
if os.path.exists(p):
return translator.load(p)
return False
Nur in calibre/src/calibre//utils: localization.py~.
++++++ calibre-no-update-manpage.diff ++++++
diff -x '*~' -Naur calibre.bak//src/calibre/gui2/ui.py calibre/src/calibre/gui2/ui.py
--- calibre.bak//src/calibre/gui2/ui.py 2010-05-01 01:20:07.000000000 +0200
+++ calibre/src/calibre/gui2/ui.py 2010-05-05 08:59:34.000000000 +0200
@@ -251,11 +251,11 @@
self.latest_version = ' '
self.vanity.setText(self.vanity_template%dict(version=' ', device=' '))
self.device_info = ' '
- if not opts.no_update_check:
- self.update_checker = CheckForUpdates(self)
- QObject.connect(self.update_checker,
- SIGNAL('update_found(PyQt_PyObject)'), self.update_found)
- self.update_checker.start(2000)
+ #if not opts.no_update_check:
+ # self.update_checker = CheckForUpdates(self)
+ # QObject.connect(self.update_checker,
+ # SIGNAL('update_found(PyQt_PyObject)'), self.update_found)
+ # self.update_checker.start(2000)
####################### Status Bar #####################
self.status_bar = StatusBar(self.jobs_dialog, self.system_tray_icon)
self.setStatusBar(self.status_bar)
diff -x '*~' -Naur calibre.bak//src/calibre/linux.py calibre/src/calibre/linux.py
--- calibre.bak//src/calibre/linux.py 2010-05-01 01:20:06.000000000 +0200
+++ calibre/src/calibre/linux.py 2010-05-05 09:46:20.000000000 +0200
@@ -326,10 +326,11 @@
if isfreebsd:
manpath = os.path.join(self.opts.staging_root, 'man/man1')
else:
- manpath = os.path.join(self.opts.staging_sharedir, 'man/man1')
+ self.info('Directory for MAN pages: %s' % self.opts.staging_mandir)
+ manpath = os.path.join(self.opts.staging_mandir, 'man1')
if not os.path.exists(manpath):
os.makedirs(manpath)
- self.info('Installing MAN pages...')
+ self.info('Installing MAN pages to %s...' % manpath)
for src in entry_points['console_scripts']:
prog, right = src.split('=')
prog = prog.strip()
@@ -342,7 +343,7 @@
if isfreebsd:
manfile = os.path.join(manpath, prog+'.1')
else:
- manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2')
+ manfile = os.path.join(manpath, prog+'.1'+'.gz')
self.info('\tInstalling MAN page for', prog)
open(manfile, 'wb').write(raw)
self.manifest.append(manfile)
diff -x '*~' -Naur calibre.bak//src/calibre/utils/help2man.py calibre/src/calibre/utils/help2man.py
--- calibre.bak//src/calibre/utils/help2man.py 2010-05-01 01:20:07.000000000 +0200
+++ calibre/src/calibre/utils/help2man.py 2010-05-05 09:19:03.000000000 +0200
@@ -3,7 +3,7 @@
__copyright__ = '2009, Kovid Goyal '
__docformat__ = 'restructuredtext en'
-import time, bz2
+import time, gzip, StringIO
from calibre.constants import isfreebsd
from calibre.constants import __version__, __appname__, __author__
@@ -59,7 +59,14 @@
x in lines]
if not isfreebsd:
- return bz2.compress((u'\n'.join(lines)).encode('utf-8'))
+ buf = StringIO.StringIO()
+ f = gzip.GzipFile(mode="wb", fileobj=buf)
+ try:
+ f.write( (u'\n'.join(lines)).encode('utf-8') )
+ finally:
+ f.close()
+ return buf.getvalue()
+ #return bz2.compress((u'\n'.join(lines)).encode('utf-8'))
else:
return (u'\n'.join(lines)).encode('utf-8')
++++++ calibre-rpmlintrc ++++++
# Output filters
# addFilter("wrong-script-end-of-line-encoding")
addFilter("python-naming-policy-not-applied")
addFilter("non-executable-script")
addFilter("files-duplicate .*/__init__.py .*")
addFilter("no-packager-tag")
addFilter("files-duplicate .*dependency_links.txt")
addFilter("files-duplicate .*/manage.py")
# Strange warning message:
addFilter("invalid-lc-messages-dir /usr/share/locale/ast/LC_MESSAGES/.*")
++++++ calibre-setup.install.py.diff ++++++
--- calibre.bak/setup/install.py 2010-04-23 22:12:00.000000000 +0200
+++ calibre/setup/install.py 2010-04-28 13:51:10.000000000 +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
@@ -75,11 +76,13 @@
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')
@@ -87,8 +90,12 @@
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)
@@ -100,9 +107,17 @@
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
@@ -113,6 +128,8 @@
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):
@@ -251,6 +268,11 @@
'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',
@@ -259,6 +281,50 @@
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):
@@ -276,7 +342,11 @@
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;Literature;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org