aboutsummaryrefslogtreecommitdiffstats
path: root/macros.in
diff options
context:
space:
mode:
Diffstat (limited to 'macros.in')
-rw-r--r--macros.in50
1 files changed, 50 insertions, 0 deletions
diff --git a/macros.in b/macros.in
index 7f2dd7d..b317282 100644
--- a/macros.in
+++ b/macros.in
@@ -45,6 +45,13 @@
# Update Menu
%_update_menus_bin %{_bindir}/update-menus
+# Various programs used in rpm scripts
+%_update_desktop_database_bin %{_bindir}/update-desktop-database
+%_update_mime_database_bin %{_bindir}/update-mime-database
+%_update_icon_cache_bin %{_bindir}/gtk-update-icon-cache
+%_gconftool_bin %{_bindir}/gconftool-2
+%_scrollkeeper_bin %{_bindir}/scrollkeeper-update
+
%__service /sbin/service
%__chkconfig /sbin/chkconfig
@@ -169,6 +176,49 @@
%clean_gcjdb if [ -x %{_rebuildgcjdb_bin} ]; then %{_rebuildgcjdb_bin} || true ; fi \
%{nil}
+# Rebuild .desktop / MIME mapping database
+%update_desktop_database if [ -x %{_update_desktop_database_bin} ]; then \
+%{_update_desktop_database_bin} %{_datadir}/applications > /dev/null || \
+true ; fi \
+%{nil}
+
+%clean_desktop_database if [ "$1" = "0" -a -x %{_update_desktop_database_bin} ]; then \
+%{_update_desktop_database_bin} %{_datadir}/applications > /dev/null || true ; fi \
+%{nil}
+
+# Rebuild freedesktop.org MIME magic/extension database
+%update_mime_database if [ -x %{_update_mime_database_bin} ]; then \
+%{_update_mime_database_bin} %{_datadir}/mime > /dev/null || true ; fi \
+%{nil}
+
+%clean_mime_database if [ "$1" = "0" -a -x %{_update_mime_database_bin} ]; \
+then %{_update_mime_database_bin} %{_datadir}/mime > /dev/null || true ; fi \
+%{nil}
+
+# Rebuild icon cache
+%update_icon_cache() if [ -x %{_update_icon_cache_bin} ]; then \
+%{_update_icon_cache_bin} --force --quiet %{_iconsdir}/%{1} || true; fi \
+%{nil}
+
+%clean_icon_cache() if [ "$1" = "0" -a -x %{_update_icon_cache_bin} ]; then \
+%{_update_icon_cache_bin} --force --quiet %{_iconsdir}/%{1} || true ; fi \
+%{nil}
+
+# Install GConf schemas
+%post_install_gconf_schemas() if [ -x %{_gconftool_bin} ]; then \
+export GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` && \
+for SCHEMA in %{*} ; do \
+ %{_gconftool_bin} --makefile-install-rule %{_sysconfdir}/gconf/schemas/$SCHEMA.schemas > /dev/null || true \
+done ; fi \
+%{nil}
+
+%preun_uninstall_gconf_schemas() if [ "$1" = "0" -a -x %{_gconftool_bin} ]; then \
+export GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` && \
+for SCHEMA in %{*} ; do \
+ %{_gconftool_bin} --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/$SCHEMA.schemas > /dev/null || true \
+done ; fi \
+%{nil}
+
# From rpm-helper
%_create_ghostfile_helper /usr/share/rpm-helper/create-file