[xsane] add icon cache update scriptlets

Nils Philippsen nphilipp at fedoraproject.org
Sat May 26 12:42:00 UTC 2012


commit 0dec5e4d4847d956294689499fd27c3c8b36b49d
Author: Nils Philippsen <nils at redhat.com>
Date:   Sat May 26 14:41:50 2012 +0200

    add icon cache update scriptlets

 xsane.spec |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/xsane.spec b/xsane.spec
index ba9e36e..65d2e68 100644
--- a/xsane.spec
+++ b/xsane.spec
@@ -15,7 +15,7 @@
 Name: xsane
 Summary: X Window System front-end for the SANE scanner interface
 Version: 0.998
-Release: 9%{?dist}
+Release: 10%{?dist}
 Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz
 Source1: xsane-256x256.png
 # distro-specific: use "xdg-open" instead of "netscape" to launch help browser
@@ -177,6 +177,18 @@ if [ -L "%{gimpplugindir}/xsane" ]; then
     rm -f "%{gimpplugindir}/xsane"
 fi
 
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+
 %files -f XSANE.lang
 %defattr(-,root,root)
 %doc xsane.ACCELKEYS xsane.AUTHOR xsane.BEGINNERS-INFO xsane.BUGS xsane.CHANGES xsane.COPYING xsane.FAQ xsane.LANGUAGES xsane.LOGO xsane.NEWS xsane.ONLINEHELP xsane.PROBLEMS xsane.ROOT xsane.TODO
@@ -197,6 +209,9 @@ fi
 %{_datadir}/sane/xsane
 
 %changelog
+* Sat May 26 2012 Nils Philippsen <nils at redhat.com> - 0.998-10
+- add icon cache update scriptlets
+
 * Fri May 25 2012 Nils Philippsen <nils at redhat.com> - 0.998-9
 - install and use higher resolution icons (#795085)
 


More information about the scm-commits mailing list