From 276efb34ffd45f89cb48656808aaae211ed7d984 Mon Sep 17 00:00:00 2001 From: Larry Hajali Date: Tue, 29 Jun 2010 12:40:58 -0500 Subject: office/calibre: Updated for version 0.7.4. Signed-off-by: Robby Workman --- office/calibre/calibre.SlackBuild | 13 +++---- office/calibre/calibre.info | 6 +-- office/calibre/patches/fix-manpages.patch | 21 ----------- office/calibre/patches/manpages-installation.patch | 44 ++++++++++++++++++++++ 4 files changed, 52 insertions(+), 32 deletions(-) delete mode 100644 office/calibre/patches/fix-manpages.patch create mode 100644 office/calibre/patches/manpages-installation.patch (limited to 'office') diff --git a/office/calibre/calibre.SlackBuild b/office/calibre/calibre.SlackBuild index 7dd5825e252a..18a1bcdbcf27 100644 --- a/office/calibre/calibre.SlackBuild +++ b/office/calibre/calibre.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=calibre -VERSION=0.7.2 +VERSION=0.7.4 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -70,19 +70,17 @@ find . \ -exec chmod 644 {} \; # Fix man pages. -patch -p1 < $CWD/patches/fix-manpages.patch +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 version info. -sed -i "s|0.7.1|$VERSION|" src/calibre/{constants.py,translations/calibre.pot} CFLAGS="$SLKCFLAGS" python setup.py build # We have to fake out CALIBRE_CONFIG_DIRECTORY if there is a current -# calibre installation while the install process takes place. :( -mkdir -p $PWD/tmp/config +# calibre installation while the install process takes place. :/ +mkdir -p "$PWD/tmp/config" CALIBRE_CONFIG_DIRECTORY="$PWD/tmp/config" \ python setup.py install \ @@ -98,8 +96,7 @@ 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 -# Fix the man pages -for i in $PKG/usr/man/man?/*.bz2 ; do bzip2 -d $i ; done +# Fix the man pages. find $PKG/usr/man -type f -exec gzip -9 {} \; # Fix permissions on calibre's bash completion. diff --git a/office/calibre/calibre.info b/office/calibre/calibre.info index 954e64dfd43d..a4e1b538caf7 100644 --- a/office/calibre/calibre.info +++ b/office/calibre/calibre.info @@ -1,8 +1,8 @@ PRGNAM="calibre" -VERSION="0.7.2" +VERSION="0.7.4" HOMEPAGE="http://calibre-ebook.com/" -DOWNLOAD="http://downloads.sourceforge.net/calibre/calibre-0.7.2.tar.gz" -MD5SUM="296531c56e12a9825418cbe1c040abd1" +DOWNLOAD="http://downloads.sourceforge.net/calibre/calibre-0.7.4.tar.gz" +MD5SUM="9c2e3bddec53370c1a9f01d02b0ea244" DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Larry Hajali" diff --git a/office/calibre/patches/fix-manpages.patch b/office/calibre/patches/fix-manpages.patch deleted file mode 100644 index b9ea10be00ec..000000000000 --- a/office/calibre/patches/fix-manpages.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur calibre.orig/src/calibre/linux.py calibre/src/calibre/linux.py ---- calibre.orig/src/calibre/linux.py 2010-03-05 21:13:33.000000000 +0000 -+++ calibre/src/calibre/linux.py 2010-03-07 00:02:26.000000000 +0000 -@@ -325,7 +325,7 @@ - if isfreebsd: - manpath = os.path.join(self.opts.staging_root, 'man/man1') - else: -- manpath = os.path.join(self.opts.staging_sharedir, 'man/man1') -+ manpath = os.path.join(self.opts.staging_root, 'usr/man/man1') - if not os.path.exists(manpath): - os.makedirs(manpath) - self.info('Installing MAN pages...') -@@ -341,7 +341,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'+'.bz2') - self.info('\tInstalling MAN page for', prog) - open(manfile, 'wb').write(raw) - self.manifest.append(manfile) diff --git a/office/calibre/patches/manpages-installation.patch b/office/calibre/patches/manpages-installation.patch new file mode 100644 index 000000000000..60172acd1f60 --- /dev/null +++ b/office/calibre/patches/manpages-installation.patch @@ -0,0 +1,44 @@ +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') -- cgit v1.2.3