Annotation of /trunk/include/gnome2.minc
Parent Directory | Revision Log
Revision 77 -
(hide annotations)
(download)
Tue Sep 2 12:11:32 2014 UTC (9 years, 8 months ago) by niro
File size: 2100 byte(s)
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 | 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 | 77 | if [[ ${GNOME_FULL_PROCESSOR_FUNCTIONS} = 1 ]] |
10 | then | ||
11 | # required includes | ||
12 | minclude glib2 gtk2 fdo-mime | ||
13 | fi | ||
14 | niro | 76 | |
15 | niro | 1 | 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 | niro | 75 | echo "Searching gconf schemas ..." |
37 | niro | 73 | pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
38 | local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null) | ||
39 | popd &> /dev/null | ||
40 | niro | 1 | |
41 | niro | 73 | # abort here, if no schemas where found |
42 | [[ -z ${schemas} ]] && return | ||
43 | niro | 1 | |
44 | niro | 73 | echo "Updating gconf schemas ..." |
45 | export GCONF_CONFIG_SOURCE=$(${MROOT}/usr/bin/gconftool-2 --get-default-source) | ||
46 | niro | 1 | |
47 | niro | 73 | 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 | niro | 1 | fi |
55 | } | ||
56 | |||
57 | gn2_update_scrollkeeper() | ||
58 | { | ||
59 | # than run scrollkeeper | ||
60 | if [ -x ${MROOT}/usr/bin/scrollkeeper-update ] && | ||
61 | niro | 76 | [[ ${SCROLLKEEPER_UPDATE} = 1 ]] |
62 | niro | 1 | then |
63 | echo "Updating scrollkeeper ..." | ||
64 | ${MROOT}/usr/bin/scrollkeeper-update -q -p ${MROOT}/var/lib/scrollkeeper | ||
65 | fi | ||
66 | } | ||
67 | niro | 76 | gn2_minimal_postinstall() |
68 | niro | 1 | { |
69 | niro | 76 | gn2_update_gconf |
70 | gn2_update_scrollkeeper | ||
71 | niro | 1 | } |
72 | |||
73 | niro | 76 | gn2_minimal_postremove() |
74 | niro | 1 | { |
75 | niro | 76 | gn2_update_scrollkeeper |
76 | niro | 1 | } |
77 | |||
78 | gn2_postinstall() | ||
79 | { | ||
80 | gn2_update_gconf | ||
81 | gn2_update_scrollkeeper | ||
82 | niro | 76 | 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 | niro | 1 | } |
88 | |||
89 | gn2_postremove() | ||
90 | { | ||
91 | gn2_update_scrollkeeper | ||
92 | niro | 76 | 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 | niro | 1 | } |
98 | |||
99 | niro | 76 | 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 |