aboutsummaryrefslogtreecommitdiff
path: root/office
diff options
context:
space:
mode:
authorLarry Hajali <larryhaja[at]gmail[dot]com>2010-06-15 04:26:34 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-06-15 04:26:34 -0500
commit4bdda09a8054e97a1535288cf41919f3b2575207 (patch)
tree133349a3c7a0a7d5a8ed66b334dc25d4a1f2b4d6 /office
parent45e8294d0e6bf58b1777f07e427973bdc29ac412 (diff)
office/calibre: Updated for version 0.7.2.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'office')
-rw-r--r--office/calibre/README8
-rw-r--r--office/calibre/calibre.SlackBuild95
-rw-r--r--office/calibre/calibre.info8
-rw-r--r--office/calibre/desktop/calibre-ebook-viewer.desktop11
-rw-r--r--office/calibre/desktop/calibre-gui.desktop2
-rw-r--r--office/calibre/desktop/calibre-gui.pngbin0 -> 9261 bytes
-rw-r--r--office/calibre/desktop/calibre-links.txt8
-rw-r--r--office/calibre/desktop/calibre-lrfviewer.desktop2
-rw-r--r--office/calibre/desktop/calibre-viewer.pngbin0 -> 5626 bytes
-rw-r--r--office/calibre/patches/calibre-module-fix.patch14
-rw-r--r--office/calibre/patches/fix-manpages.diff21
-rw-r--r--office/calibre/patches/fix-manpages.patch21
-rw-r--r--office/calibre/patches/post-install-removal.patch44
-rw-r--r--office/calibre/patches/remove-desktop-integration.patch13
-rw-r--r--office/calibre/patches/tagging-form.patch12
-rw-r--r--office/calibre/slack-desc4
16 files changed, 112 insertions, 151 deletions
diff --git a/office/calibre/README b/office/calibre/README
index 9c62b5874e92..93bcbff11477 100644
--- a/office/calibre/README
+++ b/office/calibre/README
@@ -9,11 +9,5 @@ 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.
-This requires pysetuptools, lxml, python-dateutil, BeautifulSoup, ClientForm,
+This requires pysetuptools, cssutils, lxml, python-dateutil, BeautifulSoup,
mechanize, dnspython, and podofo.
-
-Optional: unrar and openjpeg.
-
-Note: This package conflicts with pyPdf, cssutils, and CherryPy, as it
-provides these packages (available at slackbuilds.org). Calibre also
-provides odfpy and django-tagging (not available at slackbuilds.org).
diff --git a/office/calibre/calibre.SlackBuild b/office/calibre/calibre.SlackBuild
index c9638bb892b6..7dd5825e252a 100644
--- a/office/calibre/calibre.SlackBuild
+++ b/office/calibre/calibre.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for calibre
-# Copyright 2009 Larry Hajali <larryhaja[at]gmail[dot]com>
+# Copyright 2009-2010 Larry Hajali <larryhaja[at]gmail[dot]com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,16 +23,14 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=calibre
-VERSION=${VERSION:-0.5.14}
+VERSION=0.7.2
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -43,10 +41,13 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
@@ -58,9 +59,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
+rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+cd $PRGNAM
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -69,66 +70,58 @@ find . \
-exec chmod 644 {} \;
# Fix man pages.
-patch -p1 < $CWD/patches/fix-manpages.diff
-# Remove desktop integration and post isntall step. We'll do that later.
-patch -p1 < $CWD/patches/post-install-removal.patch
-# Fix a validation error in django-tagging python module.
-patch -p1 < $CWD/patches/tagging-form.patch
-
-python setup.py install --root=$PKG
-
-# This shouldn't be necessary but calibre has a post install desktop integration
-# step that leaves unwanted files on the system if calibre is later removed.
-# So we'll provide the necessary paths for calibre to use in order to package it.
-cd build
- ln -s lib\.* lib
-cd -
-
-DESTDIR=$PKG \
-PYTHONPATH="$TMP/$PRGNAM-$VERSION/build/lib" \
-python $TMP/$PRGNAM-$VERSION/src/$PRGNAM/linux.py \
- --use-destdir \
- --do-not-reload-udev-hal \
- --group-file=/etc/group \
- --dont-check-root
-
-convert icons/library.ico $PRGNAM-gui.png
-convert icons/viewer.ico $PRGNAM-viewer.png
+patch -p1 < $CWD/patches/fix-manpages.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_CONFIG_DIRECTORY="$PWD/tmp/config" \
+python setup.py install \
+ --root=$PKG \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sharedir=/usr/share \
+ --bindir=/usr/bin \
+ --staging-libdir=$PKG/usr/lib${LIBDIRSUFFIX} \
+ --staging-bindir=$PKG/usr/bin \
+ --staging-sharedir=$PKG/usr/share
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/man1/*.bz2 ; do bzip2 -d $i ; done
-gzip -9 $PKG/usr/man/man?/*.?
+# 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 {} \;
-# Put the udev rules file in the right place
-mkdir -p $PKG/lib
-mv $PKG/etc/udev $PKG/lib
+# Fix permissions on calibre's bash completion.
+chmod 0755 $PKG/etc/bash_completion.d/$PRGNAM
-# Make the bash completion into a more standard form.
-mv $PKG/etc/bash_completion.d/calibre $PKG/etc/bash_completion.d/calibre.sh
-
-# Fix a bug in the ebook-viewer for Qt 4.5.x incompatibility.
-PYVER=$(python -c 'import sys; print sys.version[:3]')
-sed -i 's|self.view.setProperty|#self.view.setProperty|' \
- $PKG/usr/lib${LIBDIRSUFFIX}/python${PYVER}/site-packages/calibre/gui2/viewer/main_ui.py
-
-# Install the necessary desktop items
+# 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 $PRGNAM-gui.png \
- $PKG/usr/share/icons/hicolor/128x128/apps/$PRGNAM-gui.png
-install -D -m 644 $PRGNAM-viewer.png \
- $PKG/usr/share/icons/hicolor/128x128/apps/$PRGNAM-viewer.png
+install -D -m 644 $CWD/desktop/$PRGNAM-gui.png \
+ $PKG/usr/share/pixmaps/$PRGNAM-gui.png
+install -D -m 644 $CWD/desktop/$PRGNAM-viewer.png \
+ $PKG/usr/share/pixmaps/$PRGNAM-viewer.png
+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/doc/$PRGNAM-$VERSION
cp -a \
- LICENSE todo \
+ LICENSE* Changelog.yaml COPYRIGHT README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/office/calibre/calibre.info b/office/calibre/calibre.info
index 250e6fe1c6cf..954e64dfd43d 100644
--- a/office/calibre/calibre.info
+++ b/office/calibre/calibre.info
@@ -1,8 +1,8 @@
PRGNAM="calibre"
-VERSION="0.5.14"
-HOMEPAGE="http://calibre.kovidgoyal.net/"
-DOWNLOAD="http://pypi.python.org/packages/source/c/calibre/calibre-0.5.14.tar.gz"
-MD5SUM="e4c97257c0824342ecd607866c08ddaa"
+VERSION="0.7.2"
+HOMEPAGE="http://calibre-ebook.com/"
+DOWNLOAD="http://downloads.sourceforge.net/calibre/calibre-0.7.2.tar.gz"
+MD5SUM="296531c56e12a9825418cbe1c040abd1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Larry Hajali"
diff --git a/office/calibre/desktop/calibre-ebook-viewer.desktop b/office/calibre/desktop/calibre-ebook-viewer.desktop
new file mode 100644
index 000000000000..da7d750482ff
--- /dev/null
+++ b/office/calibre/desktop/calibre-ebook-viewer.desktop
@@ -0,0 +1,11 @@
+[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
index 2fbf78c5b759..a3210ed11db3 100644
--- a/office/calibre/desktop/calibre-gui.desktop
+++ b/office/calibre/desktop/calibre-gui.desktop
@@ -1,5 +1,5 @@
[Desktop Entry]
-Version=0.5.6
+Version=1.0
Type=Application
Name=calibre
GenericName=E-book library management
diff --git a/office/calibre/desktop/calibre-gui.png b/office/calibre/desktop/calibre-gui.png
new file mode 100644
index 000000000000..83eae25b1275
--- /dev/null
+++ b/office/calibre/desktop/calibre-gui.png
Binary files differ
diff --git a/office/calibre/desktop/calibre-links.txt b/office/calibre/desktop/calibre-links.txt
deleted file mode 100644
index 32f719346064..000000000000
--- a/office/calibre/desktop/calibre-links.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-/usr/share/hal/fdi/policy/20thirdparty/10-calibre.fdi
-/usr/share/mime/packages/calibre-mimetypes
-/usr/share/gnome/apps/calibre-lrfviewer.desktop
-/usr/share/gnome/apps/calibre-gui.desktop
-/usr/share/icons/hicolor/128x128/apps/calibre-gui.png
-/usr/share/icons/hicolor/128x128/apps/calibre-viewer.png
-/usr/share/applnk/calibre-lrfviewer.desktop
-/usr/share/applnk/calibre-gui.desktop \ No newline at end of file
diff --git a/office/calibre/desktop/calibre-lrfviewer.desktop b/office/calibre/desktop/calibre-lrfviewer.desktop
index 37a3fe54e4d8..9cd45cca4d13 100644
--- a/office/calibre/desktop/calibre-lrfviewer.desktop
+++ b/office/calibre/desktop/calibre-lrfviewer.desktop
@@ -1,5 +1,5 @@
[Desktop Entry]
-Version=0.5.6
+Version=1.0
Type=Application
Name=LRF Viewer
GenericName=Viewer for LRF files
diff --git a/office/calibre/desktop/calibre-viewer.png b/office/calibre/desktop/calibre-viewer.png
new file mode 100644
index 000000000000..e519f0630562
--- /dev/null
+++ b/office/calibre/desktop/calibre-viewer.png
Binary files differ
diff --git a/office/calibre/patches/calibre-module-fix.patch b/office/calibre/patches/calibre-module-fix.patch
new file mode 100644
index 000000000000..d2288d288e40
--- /dev/null
+++ b/office/calibre/patches/calibre-module-fix.patch
@@ -0,0 +1,14 @@
+diff -Naur calibre.orig/setup/install.py calibre/setup/install.py
+--- calibre.orig/setup/install.py 2010-03-05 21:13:33.000000000 +0000
++++ calibre/setup/install.py 2010-03-07 00:07:41.000000000 +0000
+@@ -142,7 +142,9 @@
+
+ def install_env_module(self):
+ import distutils.sysconfig as s
+- libdir = s.get_python_lib(prefix=self.opts.staging_root)
++ libdir = s.get_python_lib(prefix=(self.opts.staging_root + sys.prefix))
++ if not os.path.exists(libdir):
++ os.makedirs(libdir)
+ if os.path.exists(libdir):
+ path = os.path.join(libdir, 'init_calibre.py')
+ self.info('Installing calibre environment module: '+path)
diff --git a/office/calibre/patches/fix-manpages.diff b/office/calibre/patches/fix-manpages.diff
deleted file mode 100644
index 50129c6c92d9..000000000000
--- a/office/calibre/patches/fix-manpages.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -Naur calibre-0.5.12.orig/src/calibre/linux.py calibre-0.5.12/src/calibre/linux.py
---- calibre-0.5.12.orig/src/calibre/linux.py 2009-05-15 21:05:52.000000000 +0000
-+++ calibre-0.5.12/src/calibre/linux.py 2009-05-16 04:09:44.000000000 +0000
-@@ -417,7 +417,7 @@
- def install_man_pages(fatal_errors, use_destdir=False):
- from calibre.utils.help2man import create_man_page
- prefix = os.environ.get('DESTDIR', '/') if use_destdir else '/'
-- manpath = os.path.join(prefix, 'usr/share/man/man1')
-+ manpath = os.path.join(prefix, 'usr/man/man1')
- if not os.path.exists(manpath):
- os.makedirs(manpath)
- print 'Installing MAN pages...'
-@@ -431,7 +431,7 @@
- continue
- parser = parser()
- raw = create_man_page(prog, parser)
-- manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2')
-+ manfile = os.path.join(manpath, prog+'.1'+'.bz2')
- print '\tInstalling MAN page for', prog
- open(manfile, 'wb').write(raw)
- manifest.append(manfile)
diff --git a/office/calibre/patches/fix-manpages.patch b/office/calibre/patches/fix-manpages.patch
new file mode 100644
index 000000000000..b9ea10be00ec
--- /dev/null
+++ b/office/calibre/patches/fix-manpages.patch
@@ -0,0 +1,21 @@
+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/post-install-removal.patch b/office/calibre/patches/post-install-removal.patch
deleted file mode 100644
index 6a47e957a042..000000000000
--- a/office/calibre/patches/post-install-removal.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Naur calibre-0.5.14.orig/setup.py calibre-0.5.14/setup.py
---- calibre-0.5.14.orig/setup.py 2009-05-29 17:25:45.000000000 +0000
-+++ calibre-0.5.14/setup.py 2009-06-27 03:26:58.000000000 +0000
-@@ -55,8 +55,6 @@
- upload_to_pypi, stage3, stage2, stage1, upload, \
- upload_rss
-
-- entry_points['console_scripts'].append(
-- 'calibre_postinstall = calibre.linux:post_install')
- optional = []
-
-
-@@ -198,6 +196,4 @@
-
- if 'develop' in ' '.join(sys.argv) and islinux:
- subprocess.check_call('calibre_postinstall --do-not-reload-udev-hal', shell=True)
-- if 'install' in sys.argv and islinux:
-- subprocess.check_call('calibre_postinstall', shell=True)
-
-diff -Naur calibre-0.5.14.orig/src/calibre/linux.py calibre-0.5.14/src/calibre/linux.py
---- calibre-0.5.14.orig/src/calibre/linux.py 2009-05-29 17:25:45.000000000 +0000
-+++ calibre-0.5.14/src/calibre/linux.py 2009-06-27 03:26:23.000000000 +0000
-@@ -444,7 +444,6 @@
- global use_destdir
- use_destdir = opts.destdir
- manifest = []
-- setup_desktop_integration(opts.fatal_errors)
- if opts.no_root or os.geteuid() == 0:
- manifest += install_man_pages(opts.fatal_errors, use_destdir)
- manifest += setup_udev_rules(opts.group_file, not opts.dont_reload, opts.fatal_errors)
-@@ -462,13 +461,6 @@
- if opts.save_manifest_to:
- open(opts.save_manifest_to, 'wb').write('\n'.join(manifest)+'\n')
-
-- from calibre.utils.config import config_dir
-- if os.path.exists(config_dir):
-- os.chdir(config_dir)
-- for f in os.listdir('.'):
-- if os.stat(f).st_uid == 0:
-- os.unlink(f)
--
- def binary_install():
- manifest = os.path.join(getattr(sys, 'frozen_path'), 'manifest')
- exes = [x.strip() for x in open(manifest).readlines()]
diff --git a/office/calibre/patches/remove-desktop-integration.patch b/office/calibre/patches/remove-desktop-integration.patch
new file mode 100644
index 000000000000..c1fe516f364d
--- /dev/null
+++ b/office/calibre/patches/remove-desktop-integration.patch
@@ -0,0 +1,13 @@
+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:
+ self.setup_completion()
+ self.install_man_pages()
+- if islinux:
+- self.setup_desktop_integration()
+- self.create_uninstaller()
+
+ from calibre.utils.config import config_dir
+ if os.path.exists(config_dir):
diff --git a/office/calibre/patches/tagging-form.patch b/office/calibre/patches/tagging-form.patch
deleted file mode 100644
index d1d76e2ff0fe..000000000000
--- a/office/calibre/patches/tagging-form.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur calibre-0.5.14.orig/src/tagging/forms.py calibre-0.5.14/src/tagging/forms.py
---- calibre-0.5.14.orig/src/tagging/forms.py 2009-05-29 17:25:45.000000000 +0000
-+++ calibre-0.5.14/src/tagging/forms.py 2009-07-01 22:58:17.000000000 +0000
-@@ -16,7 +16,7 @@
- value = self.cleaned_data['name']
- tag_names = parse_tag_input(value)
- if len(tag_names) > 1:
-- raise ValidationError(_('Multiple tags were given.'))
-+ raise forms.ValidationError(_('Multiple tags were given.'))
- elif len(tag_names[0]) > settings.MAX_TAG_LENGTH:
- raise forms.ValidationError(
- _('A tag may be no more than %s characters long.') %
diff --git a/office/calibre/slack-desc b/office/calibre/slack-desc
index 38e00b1a0f62..ea3956539ed4 100644
--- a/office/calibre/slack-desc
+++ b/office/calibre/slack-desc
@@ -7,13 +7,13 @@
|-----handy-ruler------------------------------------------------------|
calibre: Calibre (Ebook library manager)
-calibre:
+calibre:
calibre: Calibre is a one stop solution to all your e-book needs. It is free,
calibre: open source and cross-platform in design and works well on Linux,
calibre: OS X and Windows. calibre is meant to be a complete e-library
calibre: solution and thus includes library management, format conversion,
calibre: news feeds to ebook conversion, as well as e-book reader sync
calibre: features and an integrated e-book viewer.
-calibre:
+calibre:
calibre: Homepage: http://calibre.kovidgoyal.net/
calibre: