From dbcd6d3a4c30f1a8f6298c5dd62e4a700d379aae Mon Sep 17 00:00:00 2001 From: Christian Krause Date: Jan 10 2011 21:09:58 +0000 Subject: - Remove obsolete BuildRoot tag and %clean section - Require font packages which contain files which are symlinked by calibre - Remove unnecessary shebang from internal python files - Update scriptlets for icon cache - Don't package mimeinfo.cache, it is auto-generated by update-mime-database --- diff --git a/calibre.spec b/calibre.spec index a8ea6bd..19c1ddb 100644 --- a/calibre.spec +++ b/calibre.spec @@ -2,7 +2,7 @@ Name: calibre Version: 0.7.38 -Release: 1%{?dist} +Release: 2%{?dist} Summary: E-book converter and library management Group: Applications/Multimedia License: GPLv3 @@ -18,10 +18,9 @@ URL: http://calibre-ebook.com/ # ./generate-tarball.sh %{version} Source0: %{name}-%{version}-nofonts.tar.xz Source1: generate-tarball.sh -Source2: calibre-mount-helper +Source2: calibre-mount-helper Patch0: %{name}-manpages.patch Patch1: %{name}-no-update.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python >= 2.6 BuildRequires: python-devel >= 2.6 @@ -56,6 +55,10 @@ Requires: python-mechanize Requires: python-dateutil Requires: python-genshi Requires: python-BeautifulSoup +# Require the packages of the files which are symlinked by calibre +Requires: liberation-sans-fonts +Requires: liberation-serif-fonts +Requires: liberation-mono-fonts %description Calibre is meant to be a complete e-library solution. It includes library @@ -89,6 +92,7 @@ RTF, TXT, PDF and LRS. %{__sed} -i -e '/^#!\//, 1d' src/calibre/*/*/*.py %{__sed} -i -e '/^#![ ]*\//, 1d' src/calibre/*/*.py %{__sed} -i -e '/^#!\//, 1d' src/calibre/*.py +%{__sed} -i -e '/^#!\//, 1d' src/templite/*.py %{__sed} -i -e '/^#!\//, 1d' resources/recipes/* %{__sed} -i -e '/^#!\//, 1d' resources/default_tweaks.py @@ -102,8 +106,6 @@ RTF, TXT, PDF and LRS. OVERRIDE_CFLAGS="%{optflags}" python setup.py build %install -rm -rf %{buildroot} - mkdir -p %{buildroot}%{_datadir} # create directories for xdg-utils @@ -142,6 +144,7 @@ find %{buildroot}%{_datadir}/mime -maxdepth 1 -type f|xargs rm -f # packages aren't allowed to register mimetypes like this rm -f %{buildroot}%{_datadir}/applications/defaults.list +rm -f %{buildroot}%{_datadir}/applications/mimeinfo.cache desktop-file-validate \ %{buildroot}%{_datadir}/applications/calibre-ebook-viewer.desktop @@ -215,25 +218,22 @@ done; cp -a %{SOURCE2} %{buildroot}%{_bindir}/ -%clean -%{__rm} -rf %{buildroot} - %post update-desktop-database &> /dev/null ||: update-mime-database %{_datadir}/mime &> /dev/null || : -touch --no-create %{_datadir}/icons/hicolor || : -if [ -x %{_bindir}/gtk-update-icon-cache ] ; then -%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : -fi +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun update-desktop-database &> /dev/null ||: update-mime-database %{_datadir}/mime &> /dev/null || : -touch --no-create %{_datadir}/icons/hicolor || : -if [ -x %{_bindir}/gtk-update-icon-cache ] ; then -%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + %files -f %{name}.lang %defattr(-,root,root,-) %doc COPYRIGHT LICENSE Changelog.yaml @@ -263,7 +263,7 @@ fi %{_libdir}/%{name} %{_datadir}/%{name} %{_datadir}/pixmaps/* -%{_datadir}/applications/* +%{_datadir}/applications/*.desktop %{_datadir}/mime/packages/* %{_datadir}/icons/hicolor/scalable/mimetypes/* %{_datadir}/icons/hicolor/scalable/apps/* @@ -271,6 +271,15 @@ fi %{_mandir}/man1/* %changelog +* Mon Jan 10 2011 Christian Krause - 0.7.38-2 +- Remove obsolete BuildRoot tag and %%clean section +- Require font packages which contain files which are symlinked + by calibre +- Remove unnecessary shebang from internal python files +- Update scriptlets for icon cache +- Don't package mimeinfo.cache, it is auto-generated by + update-mime-database + * Fri Jan 07 2011 Kevin Fenzi - 0.7.38-1 - Update to 0.7.38