Magellan Linux

Contents of /trunk/include/gnome2.minc

Parent Directory Parent Directory | Revision Log Revision Log


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