summaryrefslogtreecommitdiff
path: root/community/calibre
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-11-04 23:14:51 +0000
committerroot <root@rshg054.dnsready.net>2011-11-04 23:14:51 +0000
commit3026bb55941e3b04b56f5fb41b88941c6c2ce0cd (patch)
tree576b183074d925e58c2e37ae2b641e712bceacb1 /community/calibre
parentb625511a28fd8401f524474b5339e75328595150 (diff)
Fri Nov 4 23:14:51 UTC 2011
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 f11df96d8..4f53862a7 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')
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
+