summaryrefslogtreecommitdiff
path: root/community/calibre
diff options
context:
space:
mode:
Diffstat (limited to 'community/calibre')
-rw-r--r--community/calibre/PKGBUILD14
-rwxr-xr-xcommunity/calibre/calibre-mount-helper28
2 files changed, 38 insertions, 4 deletions
diff --git a/community/calibre/PKGBUILD b/community/calibre/PKGBUILD
index 2b7be9e93..4b3e0291b 100644
--- a/community/calibre/PKGBUILD
+++ b/community/calibre/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 57448 2011-10-27 21:24:16Z giovanni $
+# $Id: PKGBUILD 57853 2011-11-03 15:52:53Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Petrov Roman <nwhisper@gmail.com>
# Contributor: Andrea Fagiani <andfagiani _at_ gmail dot com>
pkgname=calibre
pkgver=0.8.24
-pkgrel=1
+pkgrel=2
pkgdesc="Ebook management application"
arch=('i686' 'x86_64' 'mips64el')
url="http://calibre-ebook.com/"
@@ -19,9 +19,11 @@ makedepends=('python2-pycountry')
optdepends=('ipython: to use calibre-debug')
install=calibre.install
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
- 'desktop_integration.patch')
+ 'desktop_integration.patch'
+ 'calibre-mount-helper')
md5sums=('9ab82f7d4d072cc6858ef92f29d6029a'
- '253ce4fe5d01f8ff76b63cd3825755ea')
+ '253ce4fe5d01f8ff76b63cd3825755ea'
+ '675cd87d41342119827ef706055491e7')
build() {
cd "${srcdir}/${pkgname}"
@@ -64,4 +66,8 @@ package() {
for decom in "${pkgdir}"/usr/share/man/man1/*.bz2; do
bzip2 -d "${decom}"
done
+
+ # See http://lwn.net/SubscriberLink/465311/7c299471a5399167/
+ rm -rf ${pkgdir}/usr/bin/calibre-mount-helper
+ install -m 755 ${srcdir}/calibre-mount-helper "${pkgdir}/usr/bin"
}
diff --git a/community/calibre/calibre-mount-helper b/community/calibre/calibre-mount-helper
new file mode 100755
index 000000000..00cac4270
--- /dev/null
+++ b/community/calibre/calibre-mount-helper
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+# Replacement for upstream mount helper using udisks/eject
+# (C) 2010 Martin Pitt <mpitt@debian.org>
+
+ACTION="$1"
+DEV="$2"
+
+case "$ACTION" in
+ mount)
+ udisks --mount "$DEV"
+
+ # check if mount worked. If not, fail
+ # udisks does return 0 even if mount failed
+ mount | grep -q "$DEV" || exit 0
+ ;;
+
+ eject)
+ eject "$DEV"
+ ;;
+
+ cleanup)
+ ;;
+
+ *)
+ echo "unknown action" >&2
+ exit 1
+esac
+