[calibre] - Remove obsolete BuildRoot tag and %clean section - Require font packages which contain files which
chkr
chkr at fedoraproject.org
Mon Jan 10 21:10:12 UTC 2011
commit dbcd6d3a4c30f1a8f6298c5dd62e4a700d379aae
Author: Christian Krause <chkr at fedoraproject.org>
Date: Mon Jan 10 22:09:58 2011 +0100
- 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
calibre.spec | 41 +++++++++++++++++++++++++----------------
1 files changed, 25 insertions(+), 16 deletions(-)
---
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 <chkr at fedoraproject.org> - 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 <kevin at tummy.com> - 0.7.38-1
- Update to 0.7.38
More information about the scm-commits
mailing list