summaryrefslogtreecommitdiff
path: root/libre/calibre-libre
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-09-03 19:50:54 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-09-03 19:50:54 -0300
commitdf2ade532a433c084058ba06df2f18785f3844d1 (patch)
tree1c3607377c05cc8c7e41f3fc121216b5d69829ec /libre/calibre-libre
parente3a7dc162f12e6bf80f7a7ac34987627aa7940cc (diff)
rename to calibre
Diffstat (limited to 'libre/calibre-libre')
-rw-r--r--libre/calibre-libre/PKGBUILD111
-rw-r--r--libre/calibre-libre/calibre.install12
-rw-r--r--libre/calibre-libre/libre.patch728
3 files changed, 0 insertions, 851 deletions
diff --git a/libre/calibre-libre/PKGBUILD b/libre/calibre-libre/PKGBUILD
deleted file mode 100644
index c3fb79ade..000000000
--- a/libre/calibre-libre/PKGBUILD
+++ /dev/null
@@ -1,111 +0,0 @@
-# $Id: PKGBUILD 118049 2014-08-29 11:58:21Z jelle $
-# Maintainer (Arch): Jelle van der Waa <jelle@vdwaa.nl>
-# Maintainer (Arch): Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor (Arch): Giovanni Scafora <giovanni@archlinux.org>
-# Contributor (Arch): Petrov Roman <nwhisper@gmail.com>
-# Contributor (Arch): Andrea Fagiani <andfagiani _at_ gmail dot com>
-# Contributor (Arch): Larry Hajali <larryhaja@gmail.com>
-# Maintainer: André Silva <emulatorman@parabola.nu>
-
-_pkgname=calibre
-pkgname=calibre-libre
-pkgver=2.1.0
-pkgrel=1
-pkgdesc="Ebook management application, without nonfree decompression engine for RAR archives"
-arch=('i686' 'x86_64' 'mips64el')
-url="http://calibre-ebook.com/"
-license=('GPL3')
-depends=('python2-six' 'python2-dateutil' 'python2-cssutils' 'python2-cherrypy'
- 'python2-mechanize' 'podofo' 'libwmf'
- 'imagemagick' 'chmlib' 'python2-lxml' 'libusbx'
- 'python2-pillow' 'shared-mime-info' 'python2-dnspython'
- 'python2-pyqt5' 'python2-psutil' 'icu' 'libmtp'
- 'python2-netifaces' 'python2-cssselect' 'python2-apsw' 'qt5-webkit'
- 'qt5-svg' 'python2-chardet' 'python2-html5lib')
-makedepends=('python2-pycountry' 'qt5-x11extras' )
-optdepends=('ipython2: to use calibre-debug')
-replaces=($_pkgname)
-conflicts=($_pkgname)
-provides=($_pkgname=$pkgver)
-install=calibre.install
-mksource=("http://download.calibre-ebook.com/${pkgver}/calibre-${pkgver}.tar.xz")
-source=("https://repo.parabolagnulinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.xz"
- 'libre.patch')
-mkmd5sums=('db212364419212846719a9d392878c16')
-md5sums=('9c7c1c246d558a08c9a1f064ba7681f5'
- '343162b9d1c97c0463d4919a8b9ac500')
-
-mksource(){
- cd "${srcdir}/${_pkgname}-${pkgver}"
-
- # Remove nonfree unRAR utility files from the source
- rm -rv src/unrar
-}
-
-prepare(){
- cd "${srcdir}/${_pkgname}-${pkgver}"
-
- # Remove nonfree rar/cbr support and references
- rm -v src/calibre/{ebooks/metadata/rar.py,utils/unrar.{cpp,py}}
- rm -v resources/images/mimetypes/{cbr,rar}.png
- rm -v imgsrc/mimetypes/rar.svg
- patch -Np1 -i "${srcdir}/libre.patch"
-
- # Remove unneeded files and libs
- rm -rf resources/${_pkgname}-portable.* \
- src/six.py \
- src/cherrypy \
- src/html5lib \
- src/chardet
-
- sed -i "s/shlex.split(ldflags)/& + ['-fPIC']/" setup/extensions.py
- #sed -i -e "s/ldflags = shlex.split(ldflags)/ldflags = shlex.split(ldflags) + ['-fPIC']/" setup/extensions.py
-
- # Use python2
- sed -i 's:\(env[ ]\+python$\|/usr/bin/python$\):\12:g' $(find . -regex ".*\.py\|.*\.recipe")
- sed -i "/pyqt_sip_dir/ s:=.*:= '/usr/share/sip/Py2-PyQt5':" setup/build_environment.py
-
- # Desktop integration (e.g. enforce arch defaults)
- sed -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \
- -e "/\(cc('xdg-icon-resource\|self.icon_resources.append\|'128'))\)/d" \
- -e "/render_img/ s/\('calibre-.*\.png'\)/os.path.join(dir, \1)/g" \
- -e "/dir, 'calibre-lrf.png'/i \
-\ dir = os.path.join(self.opts.staging_sharedir,'../pixmaps')\n\
-\ os.mkdir(dir)" \
- -e "/f = open/ s/\('calibre-.*\.desktop'\)/os.path.join(dir, \1)/g" \
- -e "/dir, 'calibre-lrfviewer.desktop'/i \
-\ dir = os.path.join(self.opts.staging_sharedir,'../applications')\n\
-\ os.mkdir(dir)" \
- -e "s/'ctc-posml'/'text' not in mt and 'pdf' not in mt and 'xhtml'/" \
- -e "s/^Name=calibre/Name=Calibre/g" \
- -i src/calibre/linux.py
-}
-
-build() {
- cd "${srcdir}/${_pkgname}-${pkgver}"
-
- LANG='en_US.UTF-8' python2 setup.py build
- # LANG='en_US.UTF-8' python2 setup.py resources
-
- # Don't build translations since building them is broken badly
- #LANG='en_US.UTF-8' python2 setup.py translations
-}
-
-package() {
- cd "${srcdir}/${_pkgname}-${pkgver}"
-
- # Fix the environment module location
- sed -i -e "s|(prefix=.*)|(prefix='$pkgdir/usr')|g" setup/install.py
-
- install -d "${pkgdir}/usr/lib/python2.7/site-packages" \
- "${pkgdir}/usr/share/zsh/site-functions"
-
- LANG='en_US.UTF-8' python2 setup.py install --root="${pkgdir}" --prefix=/usr \
- --staging-bindir="${pkgdir}/usr/bin" \
- --staging-libdir="${pkgdir}/usr/lib" \
- --staging-sharedir="${pkgdir}/usr/share"
-
- # Compiling bytecode FS#33392
- python2 -m compileall "${pkgdir}/usr/lib/calibre/"
- python2 -O -m compileall "${pkgdir}/usr/lib/calibre/"
-}
diff --git a/libre/calibre-libre/calibre.install b/libre/calibre-libre/calibre.install
deleted file mode 100644
index 6210bd0ab..000000000
--- a/libre/calibre-libre/calibre.install
+++ /dev/null
@@ -1,12 +0,0 @@
-post_install() {
- update-desktop-database -q
- update-mime-database usr/share/mime &> /dev/null
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
diff --git a/libre/calibre-libre/libre.patch b/libre/calibre-libre/libre.patch
deleted file mode 100644
index 7f1bdb6ee..000000000
--- a/libre/calibre-libre/libre.patch
+++ /dev/null
@@ -1,728 +0,0 @@
-diff -Nur calibre-1.204.1.orig/resources/images.qrc calibre-1.204.1/resources/images.qrc
---- calibre-1.204.1.orig/resources/images.qrc 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/resources/images.qrc 2014-08-03 19:38:32.047600280 -0300
-@@ -193,8 +193,6 @@
- <file>images/mimetypes/svg.png</file>
- <file>images/mimetypes/odt.png</file>
- <file>images/mimetypes/epub.png</file>
--<file>images/mimetypes/cbr.png</file>
--<file>images/mimetypes/rar.png</file>
- <file>images/mimetypes/tpz.png</file>
- <file>images/mimetypes/djvu.png</file>
- <file>images/mimetypes/computer.png</file>
-@@ -214,4 +212,4 @@
- <file>images/mimetypes/html.png</file>
- <file>images/mimetypes/lrx.png</file>
- </qresource>
--</RCC>
-\ No newline at end of file
-+</RCC>
-diff -Nur calibre-1.204.1.orig/resources/mime.types calibre-1.204.1/resources/mime.types
---- calibre-1.204.1.orig/resources/mime.types 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/resources/mime.types 2014-08-03 19:37:20.290255565 -0300
-@@ -137,7 +137,6 @@
- application/prs.nprend
- application/prs.plucker
- application/qsig
--application/rar rar
- application/rdf+xml rdf
- application/reginfo+xml rif
- application/relax-ng-compact-syntax rnc
-@@ -849,7 +848,6 @@
- application/x-pkcs7-crl crl
- application/x-python-code pyc pyo
- application/x-quicktimeplayer qtl
--application/x-rar-compressed rar
- application/x-redhat-package-manager rpm
- application/x-sh sh
- application/x-shar shar
-@@ -1372,7 +1370,6 @@
- application/x-kindle-application azw2
- application/x-mobi8-ebook azw3
- application/x-cbz cbz
--application/x-cbr cbr
- application/x-cb7 cb7
- application/x-koboreader-ebook kobo
- image/wmf wmf
-diff -Nur calibre-1.204.1.orig/session.vim calibre-1.204.1/session.vim
---- calibre-1.204.1.orig/session.vim 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/session.vim 2014-08-03 19:37:20.290255565 -0300
-@@ -11,7 +11,6 @@
- \'/usr/include/freetype2',
- \'/usr/include/fontconfig',
- \'src/qtcurve/common', 'src/qtcurve',
-- \'src/unrar',
- \'src/qt-harfbuzz/src',
- \'/usr/include/ImageMagick',
- \]
-diff -Nur calibre-1.204.1.orig/setup/extensions.py calibre-1.204.1/setup/extensions.py
---- calibre-1.204.1.orig/setup/extensions.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/setup/extensions.py 2014-08-03 19:37:20.290255565 -0300
-@@ -229,24 +229,6 @@
- sip_files=['calibre/ebooks/pdf/render/qt_hack.sip']
- ),
-
-- Extension('unrar',
-- ['unrar/%s.cpp'%(x.partition('.')[0]) for x in '''
-- rar.o strlist.o strfn.o pathfn.o savepos.o smallfn.o global.o file.o
-- filefn.o filcreat.o archive.o arcread.o unicode.o system.o
-- isnt.o crypt.o crc.o rawread.o encname.o resource.o match.o
-- timefn.o rdwrfn.o consio.o options.o ulinks.o errhnd.o rarvm.o
-- secpassword.o rijndael.o getbits.o sha1.o extinfo.o extract.o
-- volume.o list.o find.o unpack.o cmddata.o filestr.o scantree.o
-- '''.split()] + ['calibre/utils/unrar.cpp'],
-- inc_dirs=['unrar'],
-- cflags=[('/' if iswindows else '-') + x for x in (
-- 'DSILENT', 'DRARDLL', 'DUNRAR')] + (
-- [] if iswindows else ['-D_FILE_OFFSET_BITS=64',
-- '-D_LARGEFILE_SOURCE']),
-- optimize_level=2,
-- libraries=['User32', 'Advapi32', 'kernel32', 'Shell32'] if iswindows else []
-- ),
--
- ]
-
-
-diff -Nur calibre-1.204.1.orig/setup/installer/windows/freeze.py calibre-1.204.1/setup/installer/windows/freeze.py
---- calibre-1.204.1.orig/setup/installer/windows/freeze.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/setup/installer/windows/freeze.py 2014-08-03 19:37:20.290255565 -0300
-@@ -672,7 +672,7 @@
- # Because of https://github.com/fancycode/MemoryModule/issues/4
- # any extensions that use C++ exceptions must be loaded
- # from files
-- 'unrar.pyd', 'wpd.pyd', 'podofo.pyd',
-+ 'wpd.pyd', 'podofo.pyd',
- 'progress_indicator.pyd', 'hunspell.pyd',
- # As per this https://bugs.launchpad.net/bugs/1087816
- # on some systems magick.pyd fails to load from memory
-diff -Nur calibre-1.204.1.orig/setup/resources.py calibre-1.204.1/setup/resources.py
---- calibre-1.204.1.orig/setup/resources.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/setup/resources.py 2014-08-03 19:37:20.290255565 -0300
-@@ -280,7 +280,7 @@
- log = Log()
- # log.outputs = []
- for inf in supported_input_formats():
-- if inf in ('zip', 'rar', 'oebzip'):
-+ if inf in ('zip', 'oebzip'):
- continue
- for ouf in available_output_formats():
- of = ouf if ouf == 'oeb' else 'dummy.'+ouf
-diff -Nur calibre-1.204.1.orig/src/calibre/__init__.py calibre-1.204.1/src/calibre/__init__.py
---- calibre-1.204.1.orig/src/calibre/__init__.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/__init__.py 2014-08-03 19:37:20.290255565 -0300
-@@ -271,10 +271,7 @@
- # First use the file header to identify its type
- with open(path, 'rb') as f:
- id_ = f.read(3)
-- if id_ == b'Rar':
-- from calibre.utils.unrar import extract as rarextract
-- extractor = rarextract
-- elif id_.startswith(b'PK'):
-+ if id_.startswith(b'PK'):
- from calibre.libunzip import extract as zipextract
- extractor = zipextract
- if extractor is None:
-@@ -283,9 +280,6 @@
- if ext in ['zip', 'cbz', 'epub', 'oebzip']:
- from calibre.libunzip import extract as zipextract
- extractor = zipextract
-- elif ext in ['cbr', 'rar']:
-- from calibre.utils.unrar import extract as rarextract
-- extractor = rarextract
- if extractor is None:
- raise Exception('Unknown archive type')
- extractor(path, dir)
-diff -Nur calibre-1.204.1.orig/src/calibre/constants.py calibre-1.204.1/src/calibre/constants.py
---- calibre-1.204.1.orig/src/calibre/constants.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/constants.py 2014-08-03 19:37:20.290255565 -0300
-@@ -138,7 +138,6 @@
- 'html',
- 'freetype',
- 'woff',
-- 'unrar',
- 'qt_hack',
- '_regex',
- 'hunspell',
-diff -Nur calibre-1.204.1.orig/src/calibre/customize/builtins.py calibre-1.204.1/src/calibre/customize/builtins.py
---- calibre-1.204.1.orig/src/calibre/customize/builtins.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/customize/builtins.py 2014-08-03 19:37:20.290255565 -0300
-@@ -127,7 +127,7 @@
- class ComicMetadataReader(MetadataReaderPlugin):
-
- name = 'Read comic metadata'
-- file_types = set(['cbr', 'cbz'])
-+ file_types = set(['cbz'])
- description = _('Extract cover from comic files')
-
- def customization_help(self, gui=False):
-@@ -138,14 +138,8 @@
- pos = stream.tell()
- id_ = stream.read(3)
- stream.seek(pos)
-- if id_ == b'Rar':
-- ftype = 'cbr'
-- elif id_.startswith(b'PK'):
-+ if id_.startswith(b'PK'):
- ftype = 'cbz'
-- if ftype == 'cbr':
-- from calibre.utils.unrar import extract_first_alphabetically as extract_first
-- extract_first
-- else:
- from calibre.libunzip import extract_member
- extract_first = functools.partial(extract_member,
- sort_alphabetically=True)
-@@ -153,7 +147,7 @@
- ret = extract_first(stream)
- mi = MetaInformation(None, None)
- stream.seek(0)
-- if ftype in {'cbr', 'cbz'}:
-+ if ftype in {'cbz'}:
- series_index = self.site_customization
- if series_index not in {'volume', 'issue'}:
- series_index = 'volume'
-@@ -336,16 +330,6 @@
- from calibre.ebooks.metadata.pml import get_metadata
- return get_metadata(stream)
-
--class RARMetadataReader(MetadataReaderPlugin):
--
-- name = 'Read RAR metadata'
-- file_types = set(['rar'])
-- description = _('Read metadata from ebooks in RAR archives')
--
-- def get_metadata(self, stream, ftype):
-- from calibre.ebooks.metadata.rar import get_metadata
-- return get_metadata(stream)
--
- class RBMetadataReader(MetadataReaderPlugin):
-
- name = 'Read RB metadata'
-diff -Nur calibre-1.204.1.orig/src/calibre/customize/ui.py calibre-1.204.1/src/calibre/customize/ui.py
---- calibre-1.204.1.orig/src/calibre/customize/ui.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/customize/ui.py 2014-08-03 19:37:20.290255565 -0300
-@@ -440,7 +440,7 @@
- if not is_disabled(plugin):
- for format in plugin.file_types:
- formats.add(format)
-- formats.add('zip'), formats.add('rar')
-+ formats.add('zip')
- return formats
-
-
-diff -Nur calibre-1.204.1.orig/src/calibre/devices/kobo/driver.py calibre-1.204.1/src/calibre/devices/kobo/driver.py
---- calibre-1.204.1.orig/src/calibre/devices/kobo/driver.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/devices/kobo/driver.py 2014-08-03 19:37:20.290255565 -0300
-@@ -77,7 +77,7 @@
- book_class = Book
-
- # Ordered list of supported formats
-- FORMATS = ['kepub', 'epub', 'pdf', 'txt', 'cbz', 'cbr']
-+ FORMATS = ['kepub', 'epub', 'pdf', 'txt', 'cbz']
- CAN_SET_METADATA = ['collections']
-
- VENDOR_ID = [0x2237]
-diff -Nur calibre-1.204.1.orig/src/calibre/devices/mtp/filesystem_cache.py calibre-1.204.1/src/calibre/devices/mtp/filesystem_cache.py
---- calibre-1.204.1.orig/src/calibre/devices/mtp/filesystem_cache.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/devices/mtp/filesystem_cache.py 2014-08-03 19:37:20.290255565 -0300
-@@ -18,7 +18,7 @@
- from calibre.utils.icu import sort_key, lower
- from calibre.ebooks import BOOK_EXTENSIONS
-
--bexts = frozenset(BOOK_EXTENSIONS) - {'mbp', 'tan', 'rar', 'zip', 'xml'}
-+bexts = frozenset(BOOK_EXTENSIONS) - {'mbp', 'tan', 'zip', 'xml'}
-
- class FileOrFolder(object):
-
-diff -Nur calibre-1.204.1.orig/src/calibre/ebooks/__init__.py calibre-1.204.1/src/calibre/ebooks/__init__.py
---- calibre-1.204.1.orig/src/calibre/ebooks/__init__.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/ebooks/__init__.py 2014-08-03 19:37:20.290255565 -0300
-@@ -26,9 +26,9 @@
- class ParserError(ValueError):
- pass
-
--BOOK_EXTENSIONS = ['lrf', 'rar', 'zip', 'rtf', 'lit', 'txt', 'txtz', 'text', 'htm', 'xhtm',
-+BOOK_EXTENSIONS = ['lrf', 'zip', 'rtf', 'lit', 'txt', 'txtz', 'text', 'htm', 'xhtm',
- 'html', 'htmlz', 'xhtml', 'pdf', 'pdb', 'updb', 'pdr', 'prc', 'mobi', 'azw', 'doc',
-- 'epub', 'fb2', 'djv', 'djvu', 'lrx', 'cbr', 'cbz', 'cbc', 'oebzip',
-+ 'epub', 'fb2', 'djv', 'djvu', 'lrx', 'cbz', 'cbc', 'oebzip',
- 'rb', 'imp', 'odt', 'chm', 'tpz', 'azw1', 'pml', 'pmlz', 'mbp', 'tan', 'snb',
- 'xps', 'oxps', 'azw4', 'book', 'zbf', 'pobi', 'docx', 'docm', 'md',
- 'textile', 'markdown', 'ibook', 'ibooks', 'iba', 'azw3', 'ps', 'kepub']
-diff -Nur calibre-1.204.1.orig/src/calibre/ebooks/conversion/plugins/comic_input.py calibre-1.204.1/src/calibre/ebooks/conversion/plugins/comic_input.py
---- calibre-1.204.1.orig/src/calibre/ebooks/conversion/plugins/comic_input.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/ebooks/conversion/plugins/comic_input.py 2014-08-03 19:37:20.290255565 -0300
-@@ -17,8 +17,8 @@
-
- name = 'Comic Input'
- author = 'Kovid Goyal'
-- description = 'Optimize comic files (.cbz, .cbr, .cbc) for viewing on portable devices'
-- file_types = set(['cbz', 'cbr', 'cbc'])
-+ description = 'Optimize comic files (.cbz, .cbc) for viewing on portable devices'
-+ file_types = set(['cbz', 'cbc'])
- is_image_collection = True
- core_usage = -1
-
-diff -Nur calibre-1.204.1.orig/src/calibre/ebooks/conversion/plumber.py calibre-1.204.1/src/calibre/ebooks/conversion/plumber.py
---- calibre-1.204.1.orig/src/calibre/ebooks/conversion/plumber.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/ebooks/conversion/plumber.py 2014-08-03 19:37:20.290255565 -0300
-@@ -42,7 +42,7 @@
-
- def supported_input_formats():
- fmts = available_input_formats()
-- for x in ('zip', 'rar', 'oebzip'):
-+ for x in ('zip', 'oebzip'):
- fmts.add(x)
- return fmts
-
-@@ -60,7 +60,7 @@
- (self.global_max - self.global_min)
- self.global_reporter(global_frac, msg)
-
--ARCHIVE_FMTS = ('zip', 'rar', 'oebzip')
-+ARCHIVE_FMTS = ('zip', 'oebzip')
-
- class Plumber(object):
- '''
-diff -Nur calibre-1.204.1.orig/src/calibre/ebooks/metadata/archive.py calibre-1.204.1/src/calibre/ebooks/metadata/archive.py
---- calibre-1.204.1.orig/src/calibre/ebooks/metadata/archive.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/ebooks/metadata/archive.py 2014-08-03 19:37:20.290255565 -0300
-@@ -27,8 +27,6 @@
- ans = None
- if id_ == stringFileHeader:
- ans = 'zip'
-- elif id_.startswith('Rar'):
-- ans = 'rar'
- try:
- stream.seek(pos)
- except:
-@@ -40,29 +38,20 @@
- name = 'Archive Extract'
- author = 'Kovid Goyal'
- description = _('Extract common e-book formats from archives '
-- '(zip/rar) files. Also try to autodetect if they are actually '
-- 'cbz/cbr files.')
-- file_types = set(['zip', 'rar'])
-+ 'zip files. Also try to autodetect if they are actually '
-+ 'cbz files.')
-+ file_types = set(['zip'])
- supported_platforms = ['windows', 'osx', 'linux']
- on_import = True
-
- def run(self, archive):
- from calibre.utils.zipfile import ZipFile
-- is_rar = archive.lower().endswith('.rar')
-- if is_rar:
-- from calibre.utils.unrar import extract_member, names
-- else:
-- zf = ZipFile(archive, 'r')
--
-- if is_rar:
-- with open(archive, 'rb') as rf:
-- fnames = list(names(rf))
-- else:
-- fnames = zf.namelist()
-+ zf = ZipFile(archive, 'r')
-+ fnames = zf.namelist()
-
- fnames = [x for x in fnames if '.' in x and x.lower().rpartition('/')[-1] != 'thumbs.db']
- if is_comic(fnames):
-- ext = '.cbr' if is_rar else '.cbz'
-+ ext = '.cbz'
- of = self.temporary_file('_archive_extract'+ext)
- with open(archive, 'rb') as f:
- of.write(f.read())
-@@ -78,12 +67,7 @@
-
- of = self.temporary_file('_archive_extract.'+ext)
- with closing(of):
-- if is_rar:
-- with open(archive, 'rb') as f:
-- data = extract_member(f, match=None, name=fname)[1]
-- of.write(data)
-- else:
-- of.write(zf.read(fname))
-+ of.write(zf.read(fname))
- return of.name
-
- def get_comic_book_info(d, mi, series_index='volume'):
-@@ -141,10 +125,6 @@
- from calibre.utils.zipfile import ZipFile
- zf = ZipFile(stream)
- comment = zf.comment
-- elif stream_type == 'cbr':
-- from calibre.utils.unrar import RARFile
-- f = RARFile(stream, get_comment=True)
-- comment = f.comment
-
- if comment:
- import json
-diff -Nur calibre-1.204.1.orig/src/calibre/ebooks/oeb/iterator/book.py calibre-1.204.1/src/calibre/ebooks/oeb/iterator/book.py
---- calibre-1.204.1.orig/src/calibre/ebooks/oeb/iterator/book.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/ebooks/oeb/iterator/book.py 2014-08-03 19:37:20.290255565 -0300
-@@ -126,7 +126,7 @@
- self.spine = []
- Spiny = partial(SpineItem, read_anchor_map=read_anchor_map,
- run_char_count=run_char_count, from_epub=self.book_format == 'EPUB')
-- is_comic = plumber.input_fmt.lower() in {'cbc', 'cbz', 'cbr', 'cb7'}
-+ is_comic = plumber.input_fmt.lower() in {'cbc', 'cbz', 'cb7'}
- for i in ordered:
- spath = i.path
- mt = None
-diff -Nur calibre-1.204.1.orig/src/calibre/gui2/__init__.py calibre-1.204.1/src/calibre/gui2/__init__.py
---- calibre-1.204.1.orig/src/calibre/gui2/__init__.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/gui2/__init__.py 2014-08-03 19:37:20.290255565 -0300
-@@ -497,7 +497,6 @@
- 'png' : 'png',
- 'bmp' : 'bmp',
- 'cbz' : 'cbz',
-- 'cbr' : 'cbr',
- 'svg' : 'svg',
- 'html' : 'html',
- 'htmlz' : 'html',
-@@ -509,7 +508,6 @@
- 'lrx' : 'lrx',
- 'pdf' : 'pdf',
- 'pdr' : 'zero',
-- 'rar' : 'rar',
- 'zip' : 'zip',
- 'txt' : 'txt',
- 'text' : 'txt',
-diff -Nur calibre-1.204.1.orig/src/calibre/gui2/actions/add.py calibre-1.204.1/src/calibre/gui2/actions/add.py
---- calibre-1.204.1.orig/src/calibre/gui2/actions/add.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/gui2/actions/add.py 2014-08-03 19:37:20.293588940 -0300
-@@ -39,8 +39,8 @@
- (_('Text books'), ['txt', 'text', 'rtf']),
- (_('PDF Books'), ['pdf', 'azw4']),
- (_('SNB Books'), ['snb']),
-- (_('Comics'), ['cbz', 'cbr', 'cbc']),
-- (_('Archives'), ['zip', 'rar']),
-+ (_('Comics'), ['cbz', 'cbc']),
-+ (_('Archives'), ['zip']),
- (_('Wordprocessor files'), ['odt', 'doc', 'docx']),
- ]
-
-@@ -67,7 +67,7 @@
- 'sub directories (Multiple books per directory, assumes every '
- 'ebook file is a different book)')).triggered.connect(
- self.add_recursive_multiple)
-- arm = self.add_archive_menu = self.add_menu.addMenu(_('Add multiple books from archive (ZIP/RAR)'))
-+ arm = self.add_archive_menu = self.add_menu.addMenu(_('Add multiple books from archive (ZIP)'))
- self.create_menu_action(arm, 'recursive-single-archive', _(
- 'One book per directory in the archive')).triggered.connect(partial(self.add_archive, True))
- self.create_menu_action(arm, 'recursive-multiple-archive', _(
-@@ -145,7 +145,7 @@
- def add_archive(self, single):
- paths = choose_files(
- self.gui, 'recursive-archive-add', _('Choose archive file'),
-- filters=[(_('Archives'), ('zip', 'rar'))], all_files=False, select_only_single_file=True)
-+ filters=[(_('Archives'), ('zip'))], all_files=False, select_only_single_file=True)
- if paths:
- self.do_add_recursive(paths[0], single)
-
-diff -Nur calibre-1.204.1.orig/src/calibre/gui2/add.py calibre-1.204.1/src/calibre/gui2/add.py
---- calibre-1.204.1.orig/src/calibre/gui2/add.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/gui2/add.py 2014-08-03 19:37:20.293588940 -0300
-@@ -84,11 +84,8 @@
- prints('Corrupt ZIP file, trying to use local headers')
- from calibre.utils.localunzip import extractall
- extractall(self.path, self.tdir)
-- elif self.path.lower().endswith('.rar'):
-- from calibre.utils.unrar import extract
-- extract(self.path, self.tdir)
- else:
-- raise ValueError('Can only process ZIP or RAR archives')
-+ raise ValueError('Can only process ZIP archives')
-
- def run(self):
- if self.tdir is not None:
-@@ -292,7 +289,7 @@
- self.pd.canceled_signal.connect(self.canceled)
-
- def add_recursive(self, root, single=True):
-- if os.path.exists(root) and os.path.isfile(root) and root.lower().rpartition('.')[-1] in {'zip', 'rar'}:
-+ if os.path.exists(root) and os.path.isfile(root) and root.lower().rpartition('.')[-1] in {'zip'}:
- self.path = tdir = PersistentTemporaryDirectory('_arcv_')
- else:
- self.path = root
-diff -Nur calibre-1.204.1.orig/src/calibre/library/server/opds.py calibre-1.204.1/src/calibre/library/server/opds.py
---- calibre-1.204.1.orig/src/calibre/library/server/opds.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/library/server/opds.py 2014-08-03 19:37:20.293588940 -0300
-@@ -29,7 +29,7 @@
- 1 : '/opds',
- }
-
--STANZA_FORMATS = frozenset(['epub', 'pdb', 'pdf', 'cbr', 'cbz', 'djvu'])
-+STANZA_FORMATS = frozenset(['epub', 'pdb', 'pdf', 'cbz', 'djvu'])
-
- def url_for(name, version, **kwargs):
- if not name.endswith('_'):
-diff -Nur calibre-1.204.1.orig/src/calibre/linux.py calibre-1.204.1/src/calibre/linux.py
---- calibre-1.204.1.orig/src/calibre/linux.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/linux.py 2014-08-03 19:37:20.293588940 -0300
-@@ -316,7 +316,7 @@
- ):
- for fmt in fmts:
- is_input = group_title == input_group
-- if is_input and fmt in {'rar', 'zip', 'oebzip'}:
-+ if is_input and fmt in {'zip', 'oebzip'}:
- continue
- p = (get_parser(input_fmt=fmt) if is_input
- else get_parser(output_fmt=fmt))
-diff -Nur calibre-1.204.1.orig/src/calibre/test_build.py calibre-1.204.1/src/calibre/test_build.py
---- calibre-1.204.1.orig/src/calibre/test_build.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/test_build.py 2014-08-03 19:37:20.293588940 -0300
-@@ -139,11 +139,6 @@
- raise RuntimeError('PIL choked!')
- print ('PIL OK!')
-
--def test_unrar():
-- from calibre.utils.unrar import test_basic
-- test_basic()
-- print ('Unrar OK!')
--
- def test_ssl():
- import ssl
- ssl
-@@ -217,7 +212,6 @@
- test_sqlite()
- test_apsw()
- test_imaging()
-- test_unrar()
- test_icu()
- test_woff()
- test_qt()
-diff -Nur calibre-1.204.1.orig/src/calibre/utils/search_query_parser.py calibre-1.204.1/src/calibre/utils/search_query_parser.py
---- calibre-1.204.1.orig/src/calibre/utils/search_query_parser.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/utils/search_query_parser.py 2014-08-03 19:37:20.296922310 -0300
-@@ -445,16 +445,16 @@
- u'Tor Books',
- u'lrf'],
- 8: [u'Stalky and Co.', u'Rudyard Kipling', u'manybooks.net', u'lrf'],
-- 9: [u'A Game of Thrones', u'George R. R. Martin', None, u'lrf,rar'],
-- 10: [u'A Clash of Kings', u'George R. R. Martin', None, u'lrf,rar'],
-- 11: [u'A Storm of Swords', u'George R. R. Martin', None, u'lrf,rar'],
-+ 9: [u'A Game of Thrones', u'George R. R. Martin', None, u'lrf'],
-+ 10: [u'A Clash of Kings', u'George R. R. Martin', None, u'lrf'],
-+ 11: [u'A Storm of Swords', u'George R. R. Martin', None, u'lrf'],
- 12: [u'Biggles - Pioneer Air Fighter', u'W. E. Johns', None, u'lrf,rtf'],
- 13: [u'Biggles of the Camel Squadron',
- u'W. E. Johns',
- u'London:Thames, (1977)',
- u'lrf,rtf'],
-- 14: [u'A Feast for Crows', u'George R. R. Martin', None, u'lrf,rar'],
-- 15: [u'Cryptonomicon', u'Neal Stephenson', None, u'lrf,rar'],
-+ 14: [u'A Feast for Crows', u'George R. R. Martin', None, u'lrf'],
-+ 15: [u'Cryptonomicon', u'Neal Stephenson', None, u'lrf'],
- 16: [u'Quicksilver', u'Neal Stephenson', None, u'lrf,zip'],
- 17: [u'The Comedies of William Shakespeare',
- u'William Shakespeare',
-@@ -469,15 +469,15 @@
- None,
- u'lrf'],
- 20: [u'An Ideal Husband', u'Oscar Wilde', u'manybooks.net', u'lrf'],
-- 21: [u'Flight of the Nighthawks', u'Raymond E. Feist', None, u'lrf,rar'],
-- 22: [u'Into a Dark Realm', u'Raymond E. Feist', None, u'lrf,rar'],
-- 23: [u'The Sundering', u'Walter Jon Williams', None, u'lrf,rar'],
-- 24: [u'The Praxis', u'Walter Jon Williams', None, u'lrf,rar'],
-- 25: [u'Conventions of War', u'Walter Jon Williams', None, u'lrf,rar'],
-- 26: [u'Banewreaker', u'Jacqueline Carey', None, u'lrf,rar'],
-- 27: [u'Godslayer', u'Jacqueline Carey', None, u'lrf,rar'],
-- 28: [u"Kushiel's Scion", u'Jacqueline Carey', None, u'lrf,rar'],
-- 29: [u'Underworld', u'Don DeLillo', None, u'lrf,rar'],
-+ 21: [u'Flight of the Nighthawks', u'Raymond E. Feist', None, u'lrf'],
-+ 22: [u'Into a Dark Realm', u'Raymond E. Feist', None, u'lrf'],
-+ 23: [u'The Sundering', u'Walter Jon Williams', None, u'lrf'],
-+ 24: [u'The Praxis', u'Walter Jon Williams', None, u'lrf'],
-+ 25: [u'Conventions of War', u'Walter Jon Williams', None, u'lrf'],
-+ 26: [u'Banewreaker', u'Jacqueline Carey', None, u'lrf'],
-+ 27: [u'Godslayer', u'Jacqueline Carey', None, u'lrf'],
-+ 28: [u"Kushiel's Scion", u'Jacqueline Carey', None, u'lrf'],
-+ 29: [u'Underworld', u'Don DeLillo', None, u'lrf'],
- 30: [u'Genghis Khan and The Making of the Modern World',
- u'Jack Weatherford Orc',
- u'Three Rivers Press',
-@@ -488,9 +488,9 @@
- u'lrf,zip'],
- 32: [u'The Killer Angels', u'Michael Shaara', None, u'html,lrf'],
- 33: [u'Band Of Brothers', u'Stephen E Ambrose', None, u'lrf,txt'],
-- 34: [u'The Gates of Rome', u'Conn Iggulden', None, u'lrf,rar'],
-+ 34: [u'The Gates of Rome', u'Conn Iggulden', None, u'lrf'],
- 35: [u'The Death of Kings', u'Conn Iggulden', u'Bantam Dell', u'lit,lrf'],
-- 36: [u'The Field of Swords', u'Conn Iggulden', None, u'lrf,rar'],
-+ 36: [u'The Field of Swords', u'Conn Iggulden', None, u'lrf'],
- 37: [u'Masterman Ready', u'Marryat, Captain Frederick', None, u'lrf'],
- 38: [u'With the Lightnings',
- u'David Drake',
-@@ -503,16 +503,16 @@
- 40: [u'The Far Side of The Stars',
- u'David Drake',
- u'Baen Publishing Enterprises',
-- u'lrf,rar'],
-+ u'lrf'],
- 41: [u'The Way to Glory',
- u'David Drake',
- u'Baen Publishing Enterprises',
-- u'lrf,rar'],
-- 42: [u'Some Golden Harbor', u'David Drake', u'Baen Books', u'lrf,rar'],
-+ u'lrf'],
-+ 42: [u'Some Golden Harbor', u'David Drake', u'Baen Books', u'lrf'],
- 43: [u'Harry Potter And The Half-Blood Prince',
- u'J. K. Rowling',
- None,
-- u'lrf,rar'],
-+ u'lrf'],
- 44: [u'Harry Potter and the Order of the Phoenix',
- u'J. K. Rowling',
- None,
-@@ -521,12 +521,12 @@
- 46: [u'The Stars at War II',
- u'Steve White',
- u'Baen Publishing Enterprises',
-- u'lrf,rar'],
-- 47: [u'Exodus', u'Steve White,Shirley Meier', u'Baen Books', u'lrf,rar'],
-+ u'lrf'],
-+ 47: [u'Exodus', u'Steve White,Shirley Meier', u'Baen Books', u'lrf'],
- 48: [u'Harry Potter and the Goblet of Fire',
- u'J. K. Rowling',
- None,
-- u'lrf,rar'],
-+ u'lrf'],
- 49: [u'Harry Potter and the Prisoner of Azkaban',
- u'J. K. Rowling',
- None,
-@@ -539,20 +539,20 @@
- u'J.K. Rowling',
- None,
- u'lit,lrf,pdf'],
-- 52: [u"His Majesty's Dragon", u'Naomi Novik', None, u'lrf,rar'],
-+ 52: [u"His Majesty's Dragon", u'Naomi Novik', None, u'lrf'],
- 53: [u'Throne of Jade', u'Naomi Novik', u'Del Rey', u'lit,lrf'],
-- 54: [u'Black Powder War', u'Naomi Novik', u'Del Rey', u'lrf,rar'],
-+ 54: [u'Black Powder War', u'Naomi Novik', u'Del Rey', u'lrf'],
- 55: [u'War and Peace', u'Leo Tolstoy', u'gutenberg.org', u'lrf,txt'],
- 56: [u'Anna Karenina', u'Leo Tolstoy', u'gutenberg.org', u'lrf,txt'],
- 57: [u'A Shorter History of Rome',
- u'Eugene Lawrence,Sir William Smith',
- u'gutenberg.org',
- u'lrf,zip'],
-- 58: [u'The Name of the Rose', u'Umberto Eco', None, u'lrf,rar'],
-+ 58: [u'The Name of the Rose', u'Umberto Eco', None, u'lrf'],
- 71: [u"Wind Rider's Oath", u'David Weber', u'Baen', u'lrf'],
- 74: [u'Rally Cry', u'William R Forstchen', None, u'htm,lrf'],
-- 86: [u'Empire of Ivory', u'Naomi Novik', None, u'lrf,rar'],
-- 87: [u"Renegade's Magic", u'Robin Hobb', None, u'lrf,rar'],
-+ 86: [u'Empire of Ivory', u'Naomi Novik', None, u'lrf'],
-+ 87: [u"Renegade's Magic", u'Robin Hobb', None, u'lrf'],
- 89: [u'Master and commander',
- u"Patrick O'Brian",
- u'Fontana,\n1971',
-@@ -560,7 +560,7 @@
- 91: [u'A Companion to Wolves',
- u'Sarah Monette,Elizabeth Beär',
- None,
-- u'lrf,rar'],
-+ u'lrf'],
- 92: [u'The Lions of al-Rassan', u'Guy Gavriel Kay', u'Eos', u'lit,lrf'],
- 93: [u'Gardens of the Moon', u'Steven Erikson', u'Tor Fantasy', u'lit,lrf'],
- 95: [u'The Master and Margarita',
-@@ -584,7 +584,7 @@
- 144: [u'Atonement',
- u'Ian McEwan',
- u'New York : Nan A. Talese/Doubleday, 2002.',
-- u'lrf,rar'],
-+ u'lrf'],
- 146: [u'1632', u'Eric Flint', u'Baen Books', u'lit,lrf'],
- 147: [u'1633', u'David Weber,Eric Flint,Dru Blair', u'Baen', u'lit,lrf'],
- 148: [u'1634: The Baltic War',
-@@ -637,7 +637,7 @@
- 253: [u"Hunter's Run",
- u'George R. R. Martin,Gardner Dozois,Daniel Abraham',
- u'Eos',
-- u'lrf,rar'],
-+ u'lrf'],
- 257: [u'Knife of Dreams', u'Robert Jordan', None, u'lit,lrf'],
- 258: [u'Saturday',
- u'Ian McEwan',
-@@ -657,7 +657,7 @@
- u'New York : Random House, 2005.',
- u'lit,lrf'],
- 269: [u'Reap the Whirlwind', u'David Mack', u'Star Trek', u'lit,lrf'],
-- 272: [u'Mistborn', u'Brandon Sanderson', u'Tor Fantasy', u'lrf,rar'],
-+ 272: [u'Mistborn', u'Brandon Sanderson', u'Tor Fantasy', u'lrf'],
- 273: [u'The Thousandfold Thought',
- u'R. Scott Bakker',
- u'Overlook TP',
-@@ -665,17 +665,17 @@
- 276: [u'Elantris',
- u'Brandon Sanderson',
- u'New York : Tor, 2005.',
-- u'lrf,rar'],
-+ u'lrf'],
- 291: [u'Sundiver',
- u'David Brin',
- u'New York : Bantam Books, 1995.',
- u'lit,lrf'],
-- 299: [u'Imperium', u'Robert Harris', u'Arrow', u'lrf,rar'],
-+ 299: [u'Imperium', u'Robert Harris', u'Arrow', u'lrf'],
- 300: [u'Startide Rising', u'David Brin', u'Bantam', u'htm,lrf'],
- 301: [u'The Uplift War', u'David Brin', u'Spectra', u'lit,lrf'],
-- 304: [u'Brightness Reef', u'David Brin', u'Orbit', u'lrf,rar'],
-+ 304: [u'Brightness Reef', u'David Brin', u'Orbit', u'lrf'],
- 305: [u"Infinity's Shore", u'David Brin', u'Spectra', u'txt'],
-- 306: [u"Heaven's Reach", u'David Brin', u'Spectra', u'lrf,rar'],
-+ 306: [u"Heaven's Reach", u'David Brin', u'Spectra', u'lrf'],
- 325: [u"Foundation's Triumph", u'David Brin', u'Easton Press', u'lit,lrf'],
- 327: [u'I am Charlotte Simmons', u'Tom Wolfe', u'Vintage', u'htm,lrf'],
- 335: [u'The Currents of Space', u'Isaac Asimov', None, u'lit,lrf'],
-@@ -705,15 +705,15 @@
- u'Aspect',
- u'lit,lrf'],
- 356: [u'The Naked God', u'Peter F. Hamilton', u'Aspect', u'lit,lrf'],
-- 421: [u'A Shadow in Summer', u'Daniel Abraham', u'Tor Fantasy', u'lrf,rar'],
-+ 421: [u'A Shadow in Summer', u'Daniel Abraham', u'Tor Fantasy', u'lrf'],
- 427: [u'Lonesome Dove', u'Larry M\\cMurtry', None, u'lit,lrf'],
- 440: [u'Ghost', u'John Ringo', u'Baen', u'lit,lrf'],
- 441: [u'Kildar', u'John Ringo', u'Baen', u'lit,lrf'],
-- 443: [u'Hidden Empire ', u'Kevin J. Anderson', u'Aspect', u'lrf,rar'],
-+ 443: [u'Hidden Empire ', u'Kevin J. Anderson', u'Aspect', u'lrf'],
- 444: [u'The Gun Seller',
- u'Hugh Laurie',
- u'Washington Square Press',
-- u'lrf,rar']
-+ u'lrf']
- }
-
- tests = {
-diff -Nur calibre-1.204.1.orig/src/calibre/web/feeds/feedparser.py calibre-1.204.1/src/calibre/web/feeds/feedparser.py
---- calibre-1.204.1.orig/src/calibre/web/feeds/feedparser.py 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/src/calibre/web/feeds/feedparser.py 2014-08-03 19:37:20.296922310 -0300
-@@ -2081,7 +2081,7 @@
- EMAIL = 5
-
- known_xfn_relationships = set(['contact', 'acquaintance', 'friend', 'met', 'co-worker', 'coworker', 'colleague', 'co-resident', 'coresident', 'neighbor', 'child', 'parent', 'sibling', 'brother', 'sister', 'spouse', 'wife', 'husband', 'kin', 'relative', 'muse', 'crush', 'date', 'sweetheart', 'me'])
-- known_binary_extensions = set(['zip','rar','exe','gz','tar','tgz','tbz2','bz2','z','7z','dmg','img','sit','sitx','hqx','deb','rpm','bz2','jar','rar','iso','bin','msi','mp2','mp3','ogg','ogm','mp4','m4v','m4a','avi','wma','wmv'])
-+ known_binary_extensions = set(['zip','exe','gz','tar','tgz','tbz2','bz2','z','7z','dmg','img','sit','sitx','hqx','deb','rpm','bz2','jar','iso','bin','msi','mp2','mp3','ogg','ogm','mp4','m4v','m4a','avi','wma','wmv'])
-
- def __init__(self, data, baseuri, encoding):
- self.document = BeautifulSoup.BeautifulSoup(data)
-diff -Nur calibre-1.204.1.orig/translations/calibre/main.pot calibre-1.204.1/translations/calibre/main.pot
---- calibre-1.204.1.orig/translations/calibre/main.pot 1989-12-31 22:00:00.000000000 -0200
-+++ calibre-1.204.1/translations/calibre/main.pot 2014-08-03 19:37:20.296922310 -0300
-@@ -3906,7 +3906,7 @@
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/archive.py:42
--msgid "Extract common e-book formats from archives (zip/rar) files. Also try to autodetect if they are actually cbz/cbr files."
-+msgid "Extract common e-book formats from archives (zip) files. Also try to autodetect if they are actually cbz files."
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/book/base.py:644
-@@ -11087,7 +11087,7 @@
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/comicconf.py:33
--msgid "Set defaults for conversion of comics (CBR/CBZ files)"
-+msgid "Set defaults for conversion of comics (CBZ files)"
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/comicconf.py:48