24 |
# first update gconf |
# first update gconf |
25 |
if [ -x ${MROOT}/usr/bin/gconftool-2 ] |
if [ -x ${MROOT}/usr/bin/gconftool-2 ] |
26 |
then |
then |
27 |
pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/etc/gconf/schemas ] |
28 |
local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null) |
then |
29 |
popd &> /dev/null |
pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
30 |
|
local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null) |
31 |
# abort here, if no schemas where found |
popd &> /dev/null |
32 |
[[ -z ${schemas} ]] && return |
|
33 |
|
# abort here, if no schemas where found |
34 |
echo "Updating gconf schemas ..." |
[[ -z ${schemas} ]] && return |
35 |
export GCONF_CONFIG_SOURCE=$(${MROOT}/usr/bin/gconftool-2 --get-default-source) |
|
36 |
|
echo "Updating gconf schemas ..." |
37 |
local i |
export GCONF_CONFIG_SOURCE=$(${MROOT}/usr/bin/gconftool-2 --get-default-source) |
38 |
for i in ${schemas} |
|
39 |
do |
local i |
40 |
# echo "DEBUG::gconf install ${i}" |
for i in ${schemas} |
41 |
${MROOT}/usr/bin/gconftool-2 --makefile-install-rule ${MROOT}/${i} 1>/dev/null |
do |
42 |
done |
# echo "DEBUG::gconf install ${i}" |
43 |
gn2_reload_gconf |
${MROOT}/usr/bin/gconftool-2 --makefile-install-rule ${MROOT}/${i} 1>/dev/null |
44 |
|
done |
45 |
|
gn2_reload_gconf |
46 |
|
fi |
47 |
fi |
fi |
48 |
} |
} |
49 |
|
|
63 |
# update desktop db |
# update desktop db |
64 |
if [ -x ${MROOT}/usr/bin/update-desktop-database ] |
if [ -x ${MROOT}/usr/bin/update-desktop-database ] |
65 |
then |
then |
66 |
echo "Updating desktop mime database ..." |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/applications ] |
67 |
${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications |
then |
68 |
|
echo "Updating desktop mime database ..." |
69 |
|
${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications |
70 |
|
fi |
71 |
fi |
fi |
72 |
} |
} |
73 |
|
|
76 |
# update mime db |
# update mime db |
77 |
if [ -x ${MROOT}/usr/bin/update-mime-database ] |
if [ -x ${MROOT}/usr/bin/update-mime-database ] |
78 |
then |
then |
79 |
echo "Updating shared mime info database ..." |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/mime ] |
80 |
${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime |
then |
81 |
|
echo "Updating shared mime info database ..." |
82 |
|
${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime |
83 |
|
fi |
84 |
fi |
fi |
85 |
} |
} |
86 |
|
|
88 |
{ |
{ |
89 |
if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] |
if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] |
90 |
then |
then |
91 |
pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/icons ] |
92 |
local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
then |
93 |
popd &> /dev/null |
pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
94 |
|
local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
95 |
# abort here, if no icons where found |
popd &> /dev/null |
96 |
[[ -z ${icons} ]] && return |
|
97 |
|
# abort here, if no icons where found |
98 |
echo "Updating icons cache ..." |
[[ -z ${icons} ]] && return |
99 |
local i |
|
100 |
for i in ${icons} |
echo "Updating icons cache ..." |
101 |
do |
local i |
102 |
if [[ -f ${MROOT}/${i}/index.theme ]] |
for i in ${icons} |
103 |
then |
do |
104 |
${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} |
if [[ -f ${MROOT}/${i}/index.theme ]] |
105 |
fi |
then |
106 |
done |
${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} |
107 |
|
fi |
108 |
|
done |
109 |
|
fi |
110 |
|
fi |
111 |
|
} |
112 |
|
|
113 |
|
gn2_update_schemas() |
114 |
|
{ |
115 |
|
if [ -x ${MROOT}/usr/bin/glib-compile-schemas ] |
116 |
|
then |
117 |
|
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/glib-2.0/schemas ] |
118 |
|
then |
119 |
|
echo "Updating glib schemas ..." |
120 |
|
${MROOT}/usr/bin/glib-compile-schemas ${MROOT}/usr/share/glib-2.0/schemas |
121 |
|
fi |
122 |
|
fi |
123 |
|
} |
124 |
|
|
125 |
|
gn2_update_gio() |
126 |
|
{ |
127 |
|
if [ -x ${MROOT}/usr/bin/gio-querymodules ] |
128 |
|
then |
129 |
|
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/$(mlibdir)/gio/modules ] |
130 |
|
then |
131 |
|
echo "Updating glib gio modules ..." |
132 |
|
${MROOT}/usr/bin/gio-querymodules ${MROOT}/usr/$(mlibdir)/gio/modules |
133 |
|
fi |
134 |
fi |
fi |
135 |
} |
} |
136 |
|
|
138 |
{ |
{ |
139 |
gn2_update_gconf |
gn2_update_gconf |
140 |
gn2_update_scrollkeeper |
gn2_update_scrollkeeper |
141 |
|
gn2_update_schemas |
142 |
|
gn2_update_gio |
143 |
gn2_update_desktop_db |
gn2_update_desktop_db |
144 |
gn2_update_mime_db |
gn2_update_mime_db |
145 |
gn2_update_icon_cache |
gn2_update_icon_cache |
148 |
gn2_postremove() |
gn2_postremove() |
149 |
{ |
{ |
150 |
gn2_update_scrollkeeper |
gn2_update_scrollkeeper |
151 |
|
gn2_update_schemas |
152 |
|
gn2_update_gio |
153 |
gn2_update_desktop_db |
gn2_update_desktop_db |
154 |
gn2_update_mime_db |
gn2_update_mime_db |
155 |
gn2_update_icon_cache |
gn2_update_icon_cache |