[packages/mate-themes] fix post scriptlets updating icon caches only themes that have it

glen glen at pld-linux.org
Sat Apr 6 12:00:10 CEST 2013


commit 49f66d889176da6bf9c2c9faf0ae362d6e6cf880
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Apr 6 12:59:21 2013 +0300

    fix post scriptlets updating icon caches only themes that have it

 mate-themes.spec | 30 ++++++------------------------
 1 file changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/mate-themes.spec b/mate-themes.spec
index 5710777..17f7abb 100644
--- a/mate-themes.spec
+++ b/mate-themes.spec
@@ -5,7 +5,7 @@
 Summary:	MATE Desktop themes
 Name:		mate-themes
 Version:	1.6.0
-Release:	0.7
+Release:	0.11
 License:	GPL v2+
 Group:		Themes
 Source0:	http://pub.mate-desktop.org/releases/1.6/%{name}-%{version}.tar.xz
@@ -19,6 +19,7 @@ BuildRequires:	mate-common
 BuildRequires:	mate-doc-utils
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	xz
+Requires:	gtk-update-icon-cache
 Requires:	gtk2-engines
 Requires:	gtk2-theme-engine-murrine
 Requires:	mate-icon-theme >= 1.5
@@ -90,34 +91,15 @@ done
 rm -rf $RPM_BUILD_ROOT
 
 %post
-for icon_theme in \
-  Fog PrintLarge Quid Reverse Shiny Simply TraditionalOk \
-  ContrastHighLargePrint ContrastHighLargePrintInverse \
-  ContrastLow ContrastHigh ContrastHighInverse Aldabra ;
-do
-	/bin/touch --no-create %{_datadir}/icons/${icon_theme}
-done
+%update_icon_cache Fog
+%update_icon_cache Quid
 
 %postun
 if [ $1 -eq 0 ]; then
-	for icon_theme in \
-	Fog PrintLarge Quid Reverse Shiny Simply TraditionalOk \
-	ContrastHighLargePrint ContrastHighLargePrintInverse \
-	ContrastLow ContrastHigh ContrastHighInverse Aldabra; do
-		/bin/touch --no-create %{_datadir}/icons/${icon_theme}
-		%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/${icon_theme}
-	done
+	%update_icon_cache Fog
+	%update_icon_cache Quid
 fi
 
-%posttrans
-for icon_theme in \
-	Fog PrintLarge Quid Reverse Shiny Simply TraditionalOk \
-	ContrastHighLargePrint ContrastHighLargePrintInverse \
-	ContrastLow ContrastHigh ContrastHighInverse Aldabra; do
-	%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/${icon_theme}
-done
-exit 0
-
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING README
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mate-themes.git/commitdiff/ffa3ed77c4331cbbf7e66784c3c06608e201d0c4



More information about the pld-cvs-commit mailing list