]> git.pld-linux.org Git - packages/calibre.git/commitdiff
- rel 2
authorMariusz Mazur <mmazur@pld-linux.org>
Mon, 28 Mar 2011 22:32:48 +0000 (22:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- added mount helper script which utilizes udisks (stolen from Debian)
- use python instead of python2 in the shebang

Changed files:
    calibre-mount-helper -> 1.1
    calibre.spec -> 1.82

calibre-mount-helper [new file with mode: 0644]
calibre.spec

diff --git a/calibre-mount-helper b/calibre-mount-helper
new file mode 100644 (file)
index 0000000..00cac42
--- /dev/null
@@ -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
+
index 6a8e4de384b94f544c6587561053a219ab485eee..52a38850644f42443814592f4abf9ea5877f77d5 100644 (file)
@@ -11,17 +11,19 @@ Summary:    E-book converter and library management
 Summary(pl.UTF-8):     Konwerter oraz biblioteka dla e-booków
 Name:          calibre
 Version:       0.7.52
-Release:       1
+Release:       2
 License:       GPL v3+
 Group:         Applications/Multimedia
 Source0:       %{name}-%{version}-nofonts.tar.xz
 # Source0-md5: 2d20153b4b26c6d5330a141768bffaeb
 Source1:       generate-tarball.sh
+Source2:       calibre-mount-helper
 Patch0:                %{name}-prefix.patch
 Patch1:                %{name}-manpages.patch
 Patch2:                %{name}-no-update.patch
 Patch3:                %{name}-env_module.patch
 Patch4:                %{name}-locales.patch
+Patch5:                shebang-python-fix.patch
 URL:           http://www.calibre-ebook.com/
 BuildRequires: ImageMagick-devel >= 6.6.4.7
 BuildRequires: chmlib-devel
@@ -103,6 +105,7 @@ Pakiet ten dostarcza bashowe uzupełnianie nazw dla calibre.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 %{__python} setup.py build
@@ -140,6 +143,8 @@ done;
 
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall
 
+install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
+
 %find_lang %{name} --all-name --with-qm
 
 %clean
@@ -152,6 +157,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/calibre-complete
 %attr(755,root,root) %{_bindir}/calibre-customize
 %attr(755,root,root) %{_bindir}/calibre-debug
+%attr(755,root,root) %{_bindir}/calibre-mount-helper
 %attr(755,root,root) %{_bindir}/calibre-parallel
 %attr(755,root,root) %{_bindir}/calibre-server
 %attr(755,root,root) %{_bindir}/calibre-smtp
This page took 0.188618 seconds and 4 git commands to generate.