Magellan Linux

Annotation of /trunk/include/gnome2.minc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 79 - (hide annotations) (download)
Wed Sep 17 11:00:05 2014 UTC (9 years, 7 months ago) by niro
File size: 2043 byte(s)
-always pull in the includes
1 niro 76 # $Id$
2 niro 1
3 niro 76 # shall we run scrollkeeper ? (default no)
4 niro 1 : ${SCROLLKEEPER_UPDATE="0"}
5    
6 niro 76 # shall we export full pre|postinstall (default no, using minimal set)
7     : ${GNOME_FULL_PROCESSOR_FUNCTIONS="0"}
8    
9 niro 79 # required includes
10     minclude glib2 gtk2 fdo-mime
11 niro 76
12 niro 1 gn2_reload_gconf()
13     {
14     local pids
15    
16     if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
17     then
18     # have gconf reload the new schemas
19     pids=$(pgrep -x gconfd-2)
20     if [[ $? = 0 ]]
21     then
22     echo "Reloading gconf schemas ..."
23     kill -HUP ${pids}
24     fi
25     fi
26     }
27    
28     gn2_update_gconf()
29     {
30     # first update gconf
31     if [ -x ${MROOT}/usr/bin/gconftool-2 ]
32     then
33 niro 75 echo "Searching gconf schemas ..."
34 niro 73 pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null
35     local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
36     popd &> /dev/null
37 niro 1
38 niro 73 # abort here, if no schemas where found
39     [[ -z ${schemas} ]] && return
40 niro 1
41 niro 73 echo "Updating gconf schemas ..."
42     export GCONF_CONFIG_SOURCE=$(${MROOT}/usr/bin/gconftool-2 --get-default-source)
43 niro 1
44 niro 73 local i
45     for i in ${schemas}
46     do
47     # echo "DEBUG::gconf install ${i}"
48     ${MROOT}/usr/bin/gconftool-2 --makefile-install-rule ${MROOT}/${i} 1>/dev/null
49     done
50     gn2_reload_gconf
51 niro 1 fi
52     }
53    
54     gn2_update_scrollkeeper()
55     {
56     # than run scrollkeeper
57     if [ -x ${MROOT}/usr/bin/scrollkeeper-update ] &&
58 niro 76 [[ ${SCROLLKEEPER_UPDATE} = 1 ]]
59 niro 1 then
60     echo "Updating scrollkeeper ..."
61     ${MROOT}/usr/bin/scrollkeeper-update -q -p ${MROOT}/var/lib/scrollkeeper
62     fi
63     }
64 niro 76 gn2_minimal_postinstall()
65 niro 1 {
66 niro 76 gn2_update_gconf
67     gn2_update_scrollkeeper
68 niro 1 }
69    
70 niro 76 gn2_minimal_postremove()
71 niro 1 {
72 niro 76 gn2_update_scrollkeeper
73 niro 1 }
74    
75     gn2_postinstall()
76     {
77     gn2_update_gconf
78     gn2_update_scrollkeeper
79 niro 76 glib2_update_schemas
80     glib2_update_gio
81     fdo-mime_update_desktop_db
82     fdo-mime_update_mime_db
83     gtk2_update_icon_cache
84 niro 1 }
85    
86     gn2_postremove()
87     {
88     gn2_update_scrollkeeper
89 niro 76 glib2_update_schemas
90     glib2_update_gio
91     fdo-mime_update_desktop_db
92     fdo-mime_update_mime_db
93     gtk2_update_icon_cache
94 niro 1 }
95    
96 niro 76 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