From 08bde278d46282e0d96bc806cab38cb0a9886040 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Sat, 7 May 2011 20:00:55 -0700 Subject: [PATCH] Update icon cache scriptlet http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache --- libreoffice.spec | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/libreoffice.spec b/libreoffice.spec index a362775..e0d7e1a 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -15,7 +15,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: 3.3.99.4 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain Group: Applications/Productivity URL: http://www.documentfoundation.org/develop @@ -1661,31 +1661,26 @@ rm -rf $RPM_BUILD_ROOT %post core update-mime-database %{_datadir}/mime &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || : -if [ -x /usr/bin/gtk-update-icon-cache ]; then - for theme in hicolor locolor; do - if test -d "%{_datadir}/icons/$theme"; then - if test -f "%{_datadir}/icons/$theme/index.theme"; then - touch --no-create %{_datadir}/icons/$theme - gtk-update-icon-cache -q %{_datadir}/icons/$theme - fi - fi - done -fi +for theme in hicolor locolor; do + touch --no-create %{_datadir}/icons/$theme &>/dev/null || : +done %postun core update-mime-database %{_datadir}/mime &> /dev/null || : update-desktop-database %{_datadir}/applications &> /dev/null || : -if [ -x /usr/bin/gtk-update-icon-cache ]; then - for theme in hicolor locolor; do - if test -d "%{_datadir}/icons/$theme"; then - if test -f "%{_datadir}/icons/$theme/index.theme"; then - touch --no-create %{_datadir}/icons/$theme - gtk-update-icon-cache -q %{_datadir}/icons/$theme - fi - fi - done +if [ $1 -eq 0 ] ; then + for theme in hicolor locolor; do + touch --no-create %{_datadir}/icons/$theme &>/dev/null || : + gtk-update-icon-cache -q %{_datadir}/icons/$theme &>/dev/null || : + done fi +%posttrans core +for theme in hicolor locolor; do + gtk-update-icon-cache -q %{_datadir}/icons/$theme &>/dev/null || : +done + + %files base %defattr(-,root,root,-) %dir %{basisinstdir} @@ -2009,6 +2004,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{basisinstdir}/program/kde-open-url %changelog +* Sat May 07 2011 Christopher Aillon - 3.3.99.4-2 +- Update icon cache scriptlet + * Sat May 07 2011 David Tardon 3.3.99.4-1 - 3.4 beta4 - drop integrated 0001-Removed-duplicate-code-block-mis-merge-prolly.patch