aboutsummaryrefslogtreecommitdiffstats
path: root/build.macros.in
diff options
context:
space:
mode:
Diffstat (limited to 'build.macros.in')
-rw-r--r--build.macros.in17
1 files changed, 15 insertions, 2 deletions
diff --git a/build.macros.in b/build.macros.in
index 6d7d2c3..be64ef2 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -86,8 +86,6 @@ Group: %{group}\
%clean_desktop_database %{nil}
%update_mime_database %{nil}
%clean_mime_database %{nil}
-%update_icon_cache() %{nil}
-%clean_icon_cache() %{nil}
%update_scrollkeeper %{nil}
%clean_scrollkeeper %{nil}
@@ -106,6 +104,21 @@ Group: %{group}\
%clean_gcjdb if [ -x %{_rebuildgcjdb_bin} ]; then %{_rebuildgcjdb_bin} || true ; fi \
%{nil}
+# Rebuild icon cache
+#
+# following themes are handled through filetriggers:
+%define icon_cache_through_filetrigger_hicolor 1
+%define icon_cache_through_filetrigger_gnome 1
+%define icon_cache_through_filetrigger_oxygen 1
+
+%define update_icon_cache() %{expand: %%{!?icon_cache_through_filetrigger_%1:if [ -x %%{_update_icon_cache_bin} ]; then \
+%%{_update_icon_cache_bin} --force --quiet %%{_iconsdir}/%%{1} || true; fi \
+%%{nil}}}
+
+%define clean_icon_cache() %{expand: %%{!?icon_cache_through_filetrigger_%1:if [ -x %%{_update_icon_cache_bin} -a -r %%{_iconsdir}/%%{1}/index.theme ]; then \
+%%{_update_icon_cache_bin} --force --quiet %%{_iconsdir}/%%{1} || true ; fi \
+%%{nil}}}
+
# GConf schemas:
# installation is handled by filetriggers
%post_install_gconf_schemas() %{nil}