diff options
Diffstat (limited to 'office')
-rw-r--r-- | office/calibre/README | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | office/calibre/calibre.SlackBuild | 51 | ||||
-rw-r--r-- | office/calibre/calibre.info | 8 | ||||
-rw-r--r-- | office/calibre/desktop/calibre-ebook-viewer.desktop | 11 | ||||
-rw-r--r-- | office/calibre/desktop/calibre-gui.desktop | 11 | ||||
-rw-r--r-- | office/calibre/desktop/calibre-lrfviewer.desktop | 12 | ||||
-rw-r--r-- | office/calibre/desktop/calibre-mimetypes | 15 | ||||
-rw-r--r-- | office/calibre/patches/fix-shebangs.patch | 27 | ||||
-rw-r--r-- | office/calibre/patches/manpages-installation.patch | 44 | ||||
-rw-r--r-- | office/calibre/patches/remove-desktop-integration.patch | 12 |
10 files changed, 73 insertions, 120 deletions
diff --git a/office/calibre/README b/office/calibre/README index 1e4ebaba02..ee777c6f62 100644 --- a/office/calibre/README +++ b/office/calibre/README @@ -8,3 +8,5 @@ i.e. a single entry in the database that may correspond to ebooks in several formats. It also supports conversion from a dozen different ebook formats to LRF and EPUB. A graphical interface to the conversion software can be accessed easily by just clicking the "Convert E-books" button. + +Calibre can optionally use libunrar if installed to read rar files. diff --git a/office/calibre/calibre.SlackBuild b/office/calibre/calibre.SlackBuild index ff5e573439..4ed7729d54 100644..100755 --- a/office/calibre/calibre.SlackBuild +++ b/office/calibre/calibre.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for calibre -# Copyright 2009-2011 Larry Hajali <larryhaja[at]gmail[dot]com> +# Copyright 2009-2012 Larry Hajali <larryhaja[at]gmail[dot]com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=calibre -VERSION=0.7.45 +VERSION=${VERSION:-0.8.69} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -61,7 +61,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM chown -R root:root . find . \ @@ -70,14 +70,18 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Fix man pages. -patch -p1 < $CWD/patches/manpages-installation.patch # Remove desktop integration. We'll do that later. patch -p1 < $CWD/patches/remove-desktop-integration.patch # Fix calibre module location. patch -p1 < $CWD/patches/calibre-module-fix.patch +# Fix shebangs. +patch -p1 < $CWD/patches/fix-shebangs.patch +# Make sure version string is correct. +sed -i "/^numeric_version/s|(.*)|(${VERSION//\./, })|" src/calibre/constants.py -CFLAGS="$SLKCFLAGS" python setup.py build +OVERRIDE_CFLAGS="$SLKCFLAGS" \ +OVERRIDE_LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \ +python setup.py build # We have to fake out CALIBRE_CONFIG_DIRECTORY if there is a current # calibre installation while the build process takes place. :/ @@ -97,28 +101,41 @@ python setup.py install \ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -find $PKG/usr/man -type f -exec gzip -9 {} \; - # Fix permissions on calibre's bash completion. chmod 0755 $PKG/etc/bash_completion.d/$PRGNAM # Install the necessary desktop items. -install -D -m 644 $CWD/desktop/$PRGNAM-gui.desktop \ - $PKG/usr/share/applications/$PRGNAM-gui.desktop -install -D -m 644 $CWD/desktop/$PRGNAM-lrfviewer.desktop \ - $PKG/usr/share/applications/$PRGNAM-lrfviewer.desktop -install -D -m 644 $CWD/desktop/$PRGNAM-ebook-viewer.desktop \ - $PKG/usr/share/applications/$PRGNAM-ebook-viewer.desktop -install -D -m 644 $CWD/desktop/$PRGNAM-mimetypes \ - $PKG/usr/share/mime/packages/$PRGNAM-mimetypes +mkdir -p $PKG/usr/share/{applications,mime/packages} +cat src/calibre/linux.py | sed -n "/^VIEWER/,/^'''/p" | \ + sed -e "/'''/d" > $PKG/usr/share/applications/$PRGNAM-lrfviewer.desktop +cat src/calibre/linux.py | sed -n "/^EVIEWER/,/^'''/p" | \ + sed -e "/'''/d" > $PKG/usr/share/applications/$PRGNAM-ebook-viewer.desktop +cat src/calibre/linux.py | sed -n "/^GUI/,/^'''/p" | \ + sed -e "/'''/d" > $PKG/usr/share/applications/$PRGNAM-gui.desktop +cat src/calibre/linux.py | sed -n "/^MIME/,/^'''/p" | \ + sed -e "/'''/d" > $PKG/usr/share/mime/packages/$PRGNAM-mimetypes.xml for i in 16 24 32 64 96 128; do convert resources/images/lt.png -resize ${i}x${i}! $PRGNAM-gui-${i}.png - convert -background none resources/images/viewer.png \ + convert -background none imgsrc/viewer.svg \ -resize ${i}x${i}! $PRGNAM-viewer-${i}.png + convert imgsrc/mimetypes/lrf.svg \ + -resize ${i}x${i}! application-x-sony-bbeb-${i}.png install -D -m 0644 $PRGNAM-gui-${i}.png \ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/$PRGNAM-gui.png install -D -m 0644 $PRGNAM-viewer-${i}.png \ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/$PRGNAM-viewer.png + install -D -m 0644 application-x-sony-bbeb-${i}.png \ + $PKG/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-x-sony-bbeb.png +done + +# Don't ship fonts that are already in Slackware. +for FONT in $PKG/usr/share/$PRGNAM/fonts/liberation/*; do + # Make sure that the fonts exist first before deleting them. + if find /usr/share/fonts/ -name "$(basename $FONT)" 2>/dev/null 1>/dev/null + then + rm -f $FONT + ln -s $(find /usr/share/fonts/ -name "$(basename $FONT)") $FONT + fi done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/office/calibre/calibre.info b/office/calibre/calibre.info index cab27e604e..e3a758b46a 100644 --- a/office/calibre/calibre.info +++ b/office/calibre/calibre.info @@ -1,10 +1,10 @@ PRGNAM="calibre" -VERSION="0.7.45" +VERSION="0.8.69" HOMEPAGE="http://calibre-ebook.com/" -DOWNLOAD="http://downloads.sourceforge.net/calibre/calibre-0.7.45.tar.gz" -MD5SUM="89dacdba790e5018f3c665ce1cf5826c" +DOWNLOAD="http://downloads.sourceforge.net/calibre/calibre-0.8.69.tar.xz" +MD5SUM="c49d551dbb28ea03f3497dbdf36f4916" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="cssutils dnspython lxml mechanize podofo python-dateutil" +REQUIRES="cssutils dnspython lxml mechanize podofo python-dateutil netifaces psutil" MAINTAINER="Larry Hajali" EMAIL="larryhaja[at]gmail[dot]com" diff --git a/office/calibre/desktop/calibre-ebook-viewer.desktop b/office/calibre/desktop/calibre-ebook-viewer.desktop deleted file mode 100644 index da7d750482..0000000000 --- a/office/calibre/desktop/calibre-ebook-viewer.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=E-book Viewer -GenericName=Viewer for E-books -Comment=Viewer for E-books -TryExec=ebook-viewer -Exec=ebook-viewer %F -Icon=calibre-viewer -MimeType=application/epub+zip; -Categories=Graphics;Viewer; diff --git a/office/calibre/desktop/calibre-gui.desktop b/office/calibre/desktop/calibre-gui.desktop deleted file mode 100644 index a3210ed11d..0000000000 --- a/office/calibre/desktop/calibre-gui.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=calibre -GenericName=E-book library management -Comment=E-book library management -TryExec=calibre -Exec=calibre -Icon=calibre-gui -Categories=Office; -StartupNotify=false diff --git a/office/calibre/desktop/calibre-lrfviewer.desktop b/office/calibre/desktop/calibre-lrfviewer.desktop deleted file mode 100644 index 9cd45cca4d..0000000000 --- a/office/calibre/desktop/calibre-lrfviewer.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=LRF Viewer -GenericName=Viewer for LRF files -Comment=Viewer for LRF files (SONY ebook format files) -TryExec=lrfviewer -Exec=lrfviewer %F -Icon=calibre-viewer -MimeType=application/x-sony-bbeb; -Categories=Graphics;Viewer; -StartupNotify=false diff --git a/office/calibre/desktop/calibre-mimetypes b/office/calibre/desktop/calibre-mimetypes deleted file mode 100644 index 7e85223cbb..0000000000 --- a/office/calibre/desktop/calibre-mimetypes +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0"?> -<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> - <mime-type type="application/x-sony-bbeb"> - <comment>SONY E-book compiled format</comment> - <glob pattern="*.lrf"/> - </mime-type> - <mime-type type="application/epub+zip"> - <comment>EPUB ebook format</comment> - <glob pattern="*.epub"/> - </mime-type> - <mime-type type="text/lrs"> - <comment>SONY E-book source format</comment> - <glob pattern="*.lrs"/> - </mime-type> -</mime-info> diff --git a/office/calibre/patches/fix-shebangs.patch b/office/calibre/patches/fix-shebangs.patch new file mode 100644 index 0000000000..e742926d37 --- /dev/null +++ b/office/calibre/patches/fix-shebangs.patch @@ -0,0 +1,27 @@ +diff -Naur calibre.orig/src/calibre/ebooks/markdown/extensions/def_list.py calibre/src/calibre/ebooks/markdown/extensions/def_list.py +--- calibre.orig/src/calibre/ebooks/markdown/extensions/def_list.py 2012-06-29 04:53:39.000000000 +0000 ++++ calibre/src/calibre/ebooks/markdown/extensions/def_list.py 2012-07-03 03:31:12.127833772 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env Python ++#!/usr/bin/env python + """ + Definition List Extension for Python-Markdown + ============================================= +diff -Naur calibre.orig/src/calibre/ebooks/markdown/extensions/meta.py calibre/src/calibre/ebooks/markdown/extensions/meta.py +--- calibre.orig/src/calibre/ebooks/markdown/extensions/meta.py 2012-06-29 04:53:39.000000000 +0000 ++++ calibre/src/calibre/ebooks/markdown/extensions/meta.py 2012-07-03 03:31:34.910833575 +0000 +@@ -1,4 +1,4 @@ +-#!usr/bin/python ++#!/usr/bin/python + + """ + Meta Data Extension for Python-Markdown +diff -Naur calibre.orig/src/calibre/ebooks/markdown/extensions/tables.py calibre/src/calibre/ebooks/markdown/extensions/tables.py +--- calibre.orig/src/calibre/ebooks/markdown/extensions/tables.py 2012-06-29 04:53:39.000000000 +0000 ++++ calibre/src/calibre/ebooks/markdown/extensions/tables.py 2012-07-03 03:31:45.957833583 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env Python ++#!/usr/bin/env python + """ + Tables Extension for Python-Markdown + ==================================== diff --git a/office/calibre/patches/manpages-installation.patch b/office/calibre/patches/manpages-installation.patch deleted file mode 100644 index 60172acd1f..0000000000 --- a/office/calibre/patches/manpages-installation.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -Naur calibre.orig/src/calibre/linux.py calibre/src/calibre/linux.py ---- calibre.orig/src/calibre/linux.py 2010-06-20 00:32:31.000000000 +0000 -+++ calibre/src/calibre/linux.py 2010-06-20 19:45:45.000000000 +0000 -@@ -288,8 +288,8 @@ - def install_man_pages(self): - try: - from calibre.utils.help2man import create_man_page -- if isfreebsd: -- manpath = os.path.join(self.opts.staging_root, 'man/man1') -+ if islinux or isfreebsd: -+ manpath = os.path.join(self.opts.staging_root, 'usr/man/man1') - else: - manpath = os.path.join(self.opts.staging_sharedir, 'man/man1') - if not os.path.exists(manpath): -@@ -304,7 +304,7 @@ - continue - parser = parser() - raw = create_man_page(prog, parser) -- if isfreebsd: -+ if islinux or isfreebsd: - manfile = os.path.join(manpath, prog+'.1') - else: - manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2') -diff -Naur calibre.orig/src/calibre/utils/help2man.py calibre/src/calibre/utils/help2man.py ---- calibre.orig/src/calibre/utils/help2man.py 2010-06-20 00:32:32.000000000 +0000 -+++ calibre/src/calibre/utils/help2man.py 2010-06-20 19:52:20.000000000 +0000 -@@ -4,7 +4,7 @@ - __docformat__ = 'restructuredtext en' - - import time, bz2 --from calibre.constants import isfreebsd -+from calibre.constants import islinux, isfreebsd - - from calibre.constants import __version__, __appname__, __author__ - -@@ -58,7 +58,7 @@ - lines = [x if isinstance(x, unicode) else unicode(x, 'utf-8', 'replace') for - x in lines] - -- if not isfreebsd: -+ if not islinux and not isfreebsd: - return bz2.compress((u'\n'.join(lines)).encode('utf-8')) - else: - return (u'\n'.join(lines)).encode('utf-8') diff --git a/office/calibre/patches/remove-desktop-integration.patch b/office/calibre/patches/remove-desktop-integration.patch index c1fe516f36..dbf54d6cb0 100644 --- a/office/calibre/patches/remove-desktop-integration.patch +++ b/office/calibre/patches/remove-desktop-integration.patch @@ -1,11 +1,11 @@ diff -Naur calibre.orig/src/calibre/linux.py calibre/src/calibre/linux.py ---- calibre.orig/src/calibre/linux.py 2010-06-11 22:28:24.000000000 +0000 -+++ calibre/src/calibre/linux.py 2010-06-13 23:07:49.000000000 +0000 -@@ -133,9 +133,6 @@ - if islinux: +--- calibre.orig/src/calibre/linux.py 2012-06-29 04:53:39.000000000 +0000 ++++ calibre/src/calibre/linux.py 2012-07-03 02:57:13.834849391 +0000 +@@ -177,9 +177,6 @@ + self.mime_resources = [] + if islinux or isbsd: self.setup_completion() - self.install_man_pages() -- if islinux: +- if islinux or isbsd: - self.setup_desktop_integration() - self.create_uninstaller() |