--- trunk/include/gnome2.minc 2014/09/02 11:26:21 75 +++ trunk/include/gnome2.minc 2014/09/02 12:10:01 76 @@ -1,8 +1,14 @@ -# $Header: /magellan-cvs/mage/include/gnome2.minc,v 1.13 2008/04/10 21:56:38 niro Exp $ +# $Id$ -# shall we run scrollkeeper ? (per default no) +# shall we run scrollkeeper ? (default no) : ${SCROLLKEEPER_UPDATE="0"} +# shall we export full pre|postinstall (default no, using minimal set) +: ${GNOME_FULL_PROCESSOR_FUNCTIONS="0"} + +# required includes +minclude glib2 gtk2 fdo-mime + gn2_reload_gconf() { local pids @@ -49,101 +55,47 @@ { # than run scrollkeeper if [ -x ${MROOT}/usr/bin/scrollkeeper-update ] && - [[ ${SCROLLKEEPER_UPDATE} = 1 ]] + [[ ${SCROLLKEEPER_UPDATE} = 1 ]] then echo "Updating scrollkeeper ..." ${MROOT}/usr/bin/scrollkeeper-update -q -p ${MROOT}/var/lib/scrollkeeper fi } - -gn2_update_desktop_db() -{ - # update desktop db - if [ -x ${MROOT}/usr/bin/update-desktop-database ] - then - echo "Updating desktop mime database ..." - ${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications - fi -} - -gn2_update_mime_db() -{ - # update mime db - if [ -x ${MROOT}/usr/bin/update-mime-database ] - then - echo "Updating shared mime info database ..." - ${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime - fi -} - -gn2_update_icon_cache() -{ - local icons - - if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] - then - if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/icons ] - then - echo "Searching icon directories ..." - pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null - icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) - popd &> /dev/null - else - icons="usr/share/icons/hicolor" - fi - - # abort here, if no icons where found - [[ -z ${icons} ]] && return - - echo "Updating icons cache ..." - local i - for i in ${icons} - do - if [[ -f ${MROOT}/${i}/index.theme ]] - then - ${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} - fi - done - fi -} - -gn2_update_schemas() +gn2_minimal_postinstall() { - if [ -x ${MROOT}/usr/bin/glib-compile-schemas ] - then - echo "Updating glib schemas ..." - ${MROOT}/usr/bin/glib-compile-schemas ${MROOT}/usr/share/glib-2.0/schemas - fi + gn2_update_gconf + gn2_update_scrollkeeper } -gn2_update_gio() +gn2_minimal_postremove() { - if [ -x ${MROOT}/usr/bin/gio-querymodules ] - then - echo "Updating glib gio modules ..." - ${MROOT}/usr/bin/gio-querymodules ${MROOT}/usr/$(mlibdir)/gio/modules - fi + gn2_update_scrollkeeper } gn2_postinstall() { gn2_update_gconf gn2_update_scrollkeeper - gn2_update_schemas - gn2_update_gio - gn2_update_desktop_db - gn2_update_mime_db - gn2_update_icon_cache + glib2_update_schemas + glib2_update_gio + fdo-mime_update_desktop_db + fdo-mime_update_mime_db + gtk2_update_icon_cache } gn2_postremove() { gn2_update_scrollkeeper - gn2_update_schemas - gn2_update_gio - gn2_update_desktop_db - gn2_update_mime_db - gn2_update_icon_cache + glib2_update_schemas + glib2_update_gio + fdo-mime_update_desktop_db + fdo-mime_update_mime_db + gtk2_update_icon_cache } -export_inherits gn2 postinstall postremove +if [[ ${GNOME_FULL_PROCESSOR_FUNCTIONS} = 1 ]] +then + export_inherits gn2 postinstall postremove +else + export_inherits gn2_minimal postinstall postremove +fi