diff options
Diffstat (limited to 'macros.in')
-rw-r--r-- | macros.in | 64 |
1 files changed, 64 insertions, 0 deletions
@@ -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 |