--- /dev/null
+#!/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
+
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
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
%build
%{__python} setup.py build
%{__rm} $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall
+install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
+
%find_lang %{name} --all-name --with-qm
%clean
%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