aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2006-06-17 17:56:21 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2006-06-17 17:56:21 +0000
commit52e504c36e549157b1aaef6b4ba2c9f3d5381d67 (patch)
treef67058919a2fe2fa8210817b761f74e39dba2b88
parent7ced049673d945b829851eb5cfa345b1097e6350 (diff)
downloadrpm-setup-52e504c36e549157b1aaef6b4ba2c9f3d5381d67.tar
rpm-setup-52e504c36e549157b1aaef6b4ba2c9f3d5381d67.tar.gz
rpm-setup-52e504c36e549157b1aaef6b4ba2c9f3d5381d67.tar.bz2
rpm-setup-52e504c36e549157b1aaef6b4ba2c9f3d5381d67.tar.xz
rpm-setup-52e504c36e549157b1aaef6b4ba2c9f3d5381d67.zip
- backport scrollkeeper/webapp macros
-rw-r--r--macros.in64
1 files changed, 64 insertions, 0 deletions
diff --git a/macros.in b/macros.in
index 8dd3403..cafb045 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
@@ -106,6 +113,11 @@
%_mandir %_datadir/man
+%_webconfdir %{_sysconfdir}/httpd/conf
+%_webappconfdir %_webconfdir/webapps.d
+# compatibility
+%webappconfdir %_webappconfdir
+
#==============================================================================
# ---- Build configuration macros.
#
@@ -157,6 +169,58 @@
%{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}
+
+# Rebuild scrollkeeper database
+%update_scrollkeeper if [ -x %{_scrollkeeper_bin} ]; then \
+%{_scrollkeeper_bin} -q || true ; fi \
+%{nil}
+
+%clean_scrollkeeper if [ "$1" = "0" -a -x %{_scrollkeeper_bin} ]; \
+then %{_scrollkeeper_bin} -q || true ; fi \
+%{nil}
+
# From rpm-helper
%_create_ghostfile_helper /usr/share/rpm-helper/create-file