# $Id$ # 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 if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] then # have gconf reload the new schemas pids=$(pgrep -x gconfd-2) if [[ $? = 0 ]] then echo "Reloading gconf schemas ..." kill -HUP ${pids} fi fi } gn2_update_gconf() { # first update gconf if [ -x ${MROOT}/usr/bin/gconftool-2 ] then echo "Searching gconf schemas ..." pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null) popd &> /dev/null # abort here, if no schemas where found [[ -z ${schemas} ]] && return echo "Updating gconf schemas ..." export GCONF_CONFIG_SOURCE=$(${MROOT}/usr/bin/gconftool-2 --get-default-source) local i for i in ${schemas} do # echo "DEBUG::gconf install ${i}" ${MROOT}/usr/bin/gconftool-2 --makefile-install-rule ${MROOT}/${i} 1>/dev/null done gn2_reload_gconf fi } gn2_update_scrollkeeper() { # than run scrollkeeper if [ -x ${MROOT}/usr/bin/scrollkeeper-update ] && [[ ${SCROLLKEEPER_UPDATE} = 1 ]] then echo "Updating scrollkeeper ..." ${MROOT}/usr/bin/scrollkeeper-update -q -p ${MROOT}/var/lib/scrollkeeper fi } gn2_minimal_postinstall() { gn2_update_gconf gn2_update_scrollkeeper } gn2_minimal_postremove() { gn2_update_scrollkeeper } gn2_postinstall() { gn2_update_gconf gn2_update_scrollkeeper 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 glib2_update_schemas glib2_update_gio fdo-mime_update_desktop_db fdo-mime_update_mime_db gtk2_update_icon_cache } if [[ ${GNOME_FULL_PROCESSOR_FUNCTIONS} = 1 ]] then export_inherits gn2 postinstall postremove else export_inherits gn2_minimal postinstall postremove fi