Magellan Linux

Annotation of /trunk/include/gnome2.minc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 73 - (hide annotations) (download)
Tue Sep 2 09:48:27 2014 UTC (9 years, 8 months ago) by niro
File size: 3005 byte(s)
-revert last change
1 niro 1 # $Header: /magellan-cvs/mage/include/gnome2.minc,v 1.13 2008/04/10 21:56:38 niro Exp $
2    
3     # shall we run scrollkeeper ? (per default no)
4     : ${SCROLLKEEPER_UPDATE="0"}
5    
6     gn2_reload_gconf()
7     {
8     local pids
9    
10     if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
11     then
12     # have gconf reload the new schemas
13     pids=$(pgrep -x gconfd-2)
14     if [[ $? = 0 ]]
15     then
16     echo "Reloading gconf schemas ..."
17     kill -HUP ${pids}
18     fi
19     fi
20     }
21    
22     gn2_update_gconf()
23     {
24     # first update gconf
25     if [ -x ${MROOT}/usr/bin/gconftool-2 ]
26     then
27 niro 73 pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null
28     local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
29     popd &> /dev/null
30 niro 1
31 niro 73 # abort here, if no schemas where found
32     [[ -z ${schemas} ]] && return
33 niro 1
34 niro 73 echo "Updating gconf schemas ..."
35     export GCONF_CONFIG_SOURCE=$(${MROOT}/usr/bin/gconftool-2 --get-default-source)
36 niro 1
37 niro 73 local i
38     for i in ${schemas}
39     do
40     # echo "DEBUG::gconf install ${i}"
41     ${MROOT}/usr/bin/gconftool-2 --makefile-install-rule ${MROOT}/${i} 1>/dev/null
42     done
43     gn2_reload_gconf
44 niro 1 fi
45     }
46    
47     gn2_update_scrollkeeper()
48     {
49     # than run scrollkeeper
50     if [ -x ${MROOT}/usr/bin/scrollkeeper-update ] &&
51     [[ ${SCROLLKEEPER_UPDATE} = 1 ]]
52     then
53     echo "Updating scrollkeeper ..."
54     ${MROOT}/usr/bin/scrollkeeper-update -q -p ${MROOT}/var/lib/scrollkeeper
55     fi
56     }
57    
58     gn2_update_desktop_db()
59     {
60     # update desktop db
61     if [ -x ${MROOT}/usr/bin/update-desktop-database ]
62     then
63 niro 73 echo "Updating desktop mime database ..."
64     ${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications
65 niro 1 fi
66     }
67    
68     gn2_update_mime_db()
69     {
70     # update mime db
71     if [ -x ${MROOT}/usr/bin/update-mime-database ]
72     then
73 niro 73 echo "Updating shared mime info database ..."
74     ${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime
75 niro 1 fi
76     }
77    
78     gn2_update_icon_cache()
79     {
80     if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ]
81     then
82 niro 73 pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null
83     local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
84     popd &> /dev/null
85 niro 1
86 niro 73 # abort here, if no icons where found
87     [[ -z ${icons} ]] && return
88    
89     echo "Updating icons cache ..."
90     local i
91     for i in ${icons}
92     do
93     if [[ -f ${MROOT}/${i}/index.theme ]]
94     then
95     ${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i}
96     fi
97     done
98 niro 1 fi
99     }
100    
101 niro 45 gn2_update_schemas()
102     {
103     if [ -x ${MROOT}/usr/bin/glib-compile-schemas ]
104     then
105 niro 73 echo "Updating glib schemas ..."
106     ${MROOT}/usr/bin/glib-compile-schemas ${MROOT}/usr/share/glib-2.0/schemas
107 niro 45 fi
108     }
109    
110     gn2_update_gio()
111     {
112     if [ -x ${MROOT}/usr/bin/gio-querymodules ]
113     then
114 niro 73 echo "Updating glib gio modules ..."
115     ${MROOT}/usr/bin/gio-querymodules ${MROOT}/usr/$(mlibdir)/gio/modules
116 niro 45 fi
117     }
118    
119 niro 1 gn2_postinstall()
120     {
121     gn2_update_gconf
122     gn2_update_scrollkeeper
123 niro 45 gn2_update_schemas
124     gn2_update_gio
125 niro 1 gn2_update_desktop_db
126     gn2_update_mime_db
127     gn2_update_icon_cache
128     }
129    
130     gn2_postremove()
131     {
132     gn2_update_scrollkeeper
133 niro 45 gn2_update_schemas
134     gn2_update_gio
135 niro 1 gn2_update_desktop_db
136     gn2_update_mime_db
137     gn2_update_icon_cache
138     }
139    
140     export_inherits gn2 postinstall postremove