Contents of /branches/R11-stable/include/gnome2.minc
Parent Directory | Revision Log
Revision 81 -
(show annotations)
(download)
Tue Oct 28 10:23:28 2014 UTC (9 years, 11 months ago) by niro
File size: 2043 byte(s)
Tue Oct 28 10:23:28 2014 UTC (9 years, 11 months ago) by niro
File size: 2043 byte(s)
-release branches/R11-stable
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 | # required includes |
10 | minclude glib2 gtk2 fdo-mime |
11 | |
12 | 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 | echo "Searching gconf schemas ..." |
34 | pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
35 | local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null) |
36 | popd &> /dev/null |
37 | |
38 | # abort here, if no schemas where found |
39 | [[ -z ${schemas} ]] && return |
40 | |
41 | echo "Updating gconf schemas ..." |
42 | export GCONF_CONFIG_SOURCE=$(${MROOT}/usr/bin/gconftool-2 --get-default-source) |
43 | |
44 | 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 | fi |
52 | } |
53 | |
54 | gn2_update_scrollkeeper() |
55 | { |
56 | # than run scrollkeeper |
57 | if [ -x ${MROOT}/usr/bin/scrollkeeper-update ] && |
58 | [[ ${SCROLLKEEPER_UPDATE} = 1 ]] |
59 | then |
60 | echo "Updating scrollkeeper ..." |
61 | ${MROOT}/usr/bin/scrollkeeper-update -q -p ${MROOT}/var/lib/scrollkeeper |
62 | fi |
63 | } |
64 | gn2_minimal_postinstall() |
65 | { |
66 | gn2_update_gconf |
67 | gn2_update_scrollkeeper |
68 | } |
69 | |
70 | gn2_minimal_postremove() |
71 | { |
72 | gn2_update_scrollkeeper |
73 | } |
74 | |
75 | gn2_postinstall() |
76 | { |
77 | gn2_update_gconf |
78 | gn2_update_scrollkeeper |
79 | 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 | } |
85 | |
86 | gn2_postremove() |
87 | { |
88 | gn2_update_scrollkeeper |
89 | 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 | } |
95 | |
96 | 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 |