aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@mandriva.com>2006-06-16 13:58:05 +0000
committerFrederic Crozat <fcrozat@mandriva.com>2006-06-16 13:58:05 +0000
commit1ee9040e059a9e902388324f6fb853c24590226c (patch)
treeb917d72d5c467fb648b4fddad42b4c8efdc1b8c8
parentf505d6a8020474559c41897e7e4c0a3bcb34b866 (diff)
downloadrpm-setup-1ee9040e059a9e902388324f6fb853c24590226c.tar
rpm-setup-1ee9040e059a9e902388324f6fb853c24590226c.tar.gz
rpm-setup-1ee9040e059a9e902388324f6fb853c24590226c.tar.bz2
rpm-setup-1ee9040e059a9e902388324f6fb853c24590226c.tar.xz
rpm-setup-1ee9040e059a9e902388324f6fb853c24590226c.zip
Add new macros
-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