office/calibre: Updated for version 0.7.4.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Larry Hajali 2010-06-29 12:40:58 -05:00 committed by Robby Workman
parent 85b9e6b82c
commit 276efb34ff
4 changed files with 52 additions and 32 deletions

View file

@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=calibre PRGNAM=calibre
VERSION=0.7.2 VERSION=0.7.4
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
@ -70,19 +70,17 @@ find . \
-exec chmod 644 {} \; -exec chmod 644 {} \;
# Fix man pages. # 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. # Remove desktop integration. We'll do that later.
patch -p1 < $CWD/patches/remove-desktop-integration.patch patch -p1 < $CWD/patches/remove-desktop-integration.patch
# Fix calibre module location. # Fix calibre module location.
patch -p1 < $CWD/patches/calibre-module-fix.patch 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 CFLAGS="$SLKCFLAGS" python setup.py build
# We have to fake out CALIBRE_CONFIG_DIRECTORY if there is a current # We have to fake out CALIBRE_CONFIG_DIRECTORY if there is a current
# calibre installation while the install process takes place. :( # calibre installation while the install process takes place. :/
mkdir -p $PWD/tmp/config mkdir -p "$PWD/tmp/config"
CALIBRE_CONFIG_DIRECTORY="$PWD/tmp/config" \ CALIBRE_CONFIG_DIRECTORY="$PWD/tmp/config" \
python setup.py install \ python setup.py install \
@ -98,8 +96,7 @@ python setup.py install \
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Fix the man pages # Fix the man pages.
for i in $PKG/usr/man/man?/*.bz2 ; do bzip2 -d $i ; done
find $PKG/usr/man -type f -exec gzip -9 {} \; find $PKG/usr/man -type f -exec gzip -9 {} \;
# Fix permissions on calibre's bash completion. # Fix permissions on calibre's bash completion.

View file

@ -1,8 +1,8 @@
PRGNAM="calibre" PRGNAM="calibre"
VERSION="0.7.2" VERSION="0.7.4"
HOMEPAGE="http://calibre-ebook.com/" HOMEPAGE="http://calibre-ebook.com/"
DOWNLOAD="http://downloads.sourceforge.net/calibre/calibre-0.7.2.tar.gz" DOWNLOAD="http://downloads.sourceforge.net/calibre/calibre-0.7.4.tar.gz"
MD5SUM="296531c56e12a9825418cbe1c040abd1" MD5SUM="9c2e3bddec53370c1a9f01d02b0ea244"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
MAINTAINER="Larry Hajali" MAINTAINER="Larry Hajali"

View file

@ -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)

View file

@ -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')