Magellan Linux

Diff of /mage/trunk/include/gnome2.minc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5871 by niro, Wed Nov 7 14:02:27 2012 UTC revision 5872 by niro, Fri Oct 17 08:05:25 2014 UTC
# Line 1  Line 1 
1  # $Header: /magellan-cvs/mage/include/gnome2.minc,v 1.13 2008/04/10 21:56:38 niro Exp $  # $Id$
2    
3  # shall we run scrollkeeper ? (per default no)  # shall we run scrollkeeper ? (default no)
4  : ${SCROLLKEEPER_UPDATE="0"}  : ${SCROLLKEEPER_UPDATE="0"}
5    
6    # shall we export full pre|postinstall (default no, using minimal set)
7    : ${GNOME_FULL_PROCESSOR_FUNCTIONS="0"}
8    
9    # required includes
10    minclude glib2 gtk2 fdo-mime
11    
12  gn2_reload_gconf()  gn2_reload_gconf()
13  {  {
14   local pids   local pids
# Line 24  gn2_update_gconf() Line 30  gn2_update_gconf()
30   # first update gconf   # first update gconf
31   if [ -x ${MROOT}/usr/bin/gconftool-2 ]   if [ -x ${MROOT}/usr/bin/gconftool-2 ]
32   then   then
33     echo "Searching gconf schemas ..."
34   pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null   pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null
35   local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)   local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
36   popd &> /dev/null   popd &> /dev/null
# Line 48  gn2_update_scrollkeeper() Line 55  gn2_update_scrollkeeper()
55  {  {
56   # than run scrollkeeper   # than run scrollkeeper
57   if [ -x ${MROOT}/usr/bin/scrollkeeper-update ] &&   if [ -x ${MROOT}/usr/bin/scrollkeeper-update ] &&
58     [[ ${SCROLLKEEPER_UPDATE} = 1 ]]   [[ ${SCROLLKEEPER_UPDATE} = 1 ]]
59   then   then
60   echo "Updating scrollkeeper ..."   echo "Updating scrollkeeper ..."
61   ${MROOT}/usr/bin/scrollkeeper-update -q -p ${MROOT}/var/lib/scrollkeeper   ${MROOT}/usr/bin/scrollkeeper-update -q -p ${MROOT}/var/lib/scrollkeeper
62   fi   fi
63  }  }
64    gn2_minimal_postinstall()
 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()  
65  {  {
66   if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ]   gn2_update_gconf
67   then   gn2_update_scrollkeeper
  pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null  
  local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)  
  popd &> /dev/null  
   
  # 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()  
 {  
  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  
68  }  }
69    
70  gn2_update_gio()  gn2_minimal_postremove()
71  {  {
72   if [ -x ${MROOT}/usr/bin/gio-querymodules ]   gn2_update_scrollkeeper
  then  
  echo "Updating glib gio modules ..."  
  ${MROOT}/usr/bin/gio-querymodules ${MROOT}/usr/$(mlibdir)/gio/modules  
  fi  
73  }  }
74    
75  gn2_postinstall()  gn2_postinstall()
76  {  {
77   gn2_update_gconf   gn2_update_gconf
78   gn2_update_scrollkeeper   gn2_update_scrollkeeper
79   gn2_update_schemas   glib2_update_schemas
80   gn2_update_gio   glib2_update_gio
81   gn2_update_desktop_db   fdo-mime_update_desktop_db
82   gn2_update_mime_db   fdo-mime_update_mime_db
83   gn2_update_icon_cache   gtk2_update_icon_cache
84  }  }
85    
86  gn2_postremove()  gn2_postremove()
87  {  {
88   gn2_update_scrollkeeper   gn2_update_scrollkeeper
89   gn2_update_schemas   glib2_update_schemas
90   gn2_update_gio   glib2_update_gio
91   gn2_update_desktop_db   fdo-mime_update_desktop_db
92   gn2_update_mime_db   fdo-mime_update_mime_db
93   gn2_update_icon_cache   gtk2_update_icon_cache
94  }  }
95    
96  export_inherits gn2 postinstall postremove  if [[ ${GNOME_FULL_PROCESSOR_FUNCTIONS} = 1 ]]
97    then
98     export_inherits gn2 postinstall postremove
99    else
100     export_inherits gn2_minimal postinstall postremove
101    fi

Legend:
Removed from v.5871  
changed lines
  Added in v.5872