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 |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/etc/gconf/schemas ] |
echo "Searching gconf schemas ..." |
28 |
then |
pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
29 |
pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null) |
30 |
local schemas=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null) |
popd &> /dev/null |
31 |
popd &> /dev/null |
|
32 |
|
# abort here, if no schemas where found |
33 |
# abort here, if no schemas where found |
[[ -z ${schemas} ]] && return |
34 |
[[ -z ${schemas} ]] && return |
|
35 |
|
echo "Updating gconf schemas ..." |
36 |
echo "Updating gconf schemas ..." |
export GCONF_CONFIG_SOURCE=$(${MROOT}/usr/bin/gconftool-2 --get-default-source) |
37 |
export GCONF_CONFIG_SOURCE=$(${MROOT}/usr/bin/gconftool-2 --get-default-source) |
|
38 |
|
local i |
39 |
local i |
for i in ${schemas} |
40 |
for i in ${schemas} |
do |
41 |
do |
# echo "DEBUG::gconf install ${i}" |
42 |
# echo "DEBUG::gconf install ${i}" |
${MROOT}/usr/bin/gconftool-2 --makefile-install-rule ${MROOT}/${i} 1>/dev/null |
43 |
${MROOT}/usr/bin/gconftool-2 --makefile-install-rule ${MROOT}/${i} 1>/dev/null |
done |
44 |
done |
gn2_reload_gconf |
|
gn2_reload_gconf |
|
|
fi |
|
45 |
fi |
fi |
46 |
} |
} |
47 |
|
|
61 |
# update desktop db |
# update desktop db |
62 |
if [ -x ${MROOT}/usr/bin/update-desktop-database ] |
if [ -x ${MROOT}/usr/bin/update-desktop-database ] |
63 |
then |
then |
64 |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/applications ] |
echo "Updating desktop mime database ..." |
65 |
then |
${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications |
|
echo "Updating desktop mime database ..." |
|
|
${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications |
|
|
fi |
|
66 |
fi |
fi |
67 |
} |
} |
68 |
|
|
71 |
# update mime db |
# update mime db |
72 |
if [ -x ${MROOT}/usr/bin/update-mime-database ] |
if [ -x ${MROOT}/usr/bin/update-mime-database ] |
73 |
then |
then |
74 |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/mime ] |
echo "Updating shared mime info database ..." |
75 |
then |
${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime |
|
echo "Updating shared mime info database ..." |
|
|
${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime |
|
|
fi |
|
76 |
fi |
fi |
77 |
} |
} |
78 |
|
|
79 |
gn2_update_icon_cache() |
gn2_update_icon_cache() |
80 |
{ |
{ |
81 |
|
local icons |
82 |
|
|
83 |
if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] |
if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] |
84 |
then |
then |
85 |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/icons ] |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/icons ] |
86 |
then |
then |
87 |
|
echo "Searching icon directories ..." |
88 |
pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
89 |
local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
90 |
popd &> /dev/null |
popd &> /dev/null |
91 |
|
else |
92 |
# abort here, if no icons where found |
icons="usr/share/icons/hicolor" |
|
[[ -z ${icons} ]] && return |
|
|
|
|
|
echo "Updating icons cache ..." |
|
|
local i |
|
|
for i in ${icons} |
|
|
do |
|
|
if [[ -f ${MROOT}/${i}/index.theme ]] |
|
|
then |
|
|
${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} |
|
|
fi |
|
|
done |
|
93 |
fi |
fi |
94 |
|
|
95 |
|
# abort here, if no icons where found |
96 |
|
[[ -z ${icons} ]] && return |
97 |
|
|
98 |
|
echo "Updating icons cache ..." |
99 |
|
local i |
100 |
|
for i in ${icons} |
101 |
|
do |
102 |
|
if [[ -f ${MROOT}/${i}/index.theme ]] |
103 |
|
then |
104 |
|
${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} |
105 |
|
fi |
106 |
|
done |
107 |
fi |
fi |
108 |
} |
} |
109 |
|
|
111 |
{ |
{ |
112 |
if [ -x ${MROOT}/usr/bin/glib-compile-schemas ] |
if [ -x ${MROOT}/usr/bin/glib-compile-schemas ] |
113 |
then |
then |
114 |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/share/glib-2.0/schemas ] |
echo "Updating glib schemas ..." |
115 |
then |
${MROOT}/usr/bin/glib-compile-schemas ${MROOT}/usr/share/glib-2.0/schemas |
|
echo "Updating glib schemas ..." |
|
|
${MROOT}/usr/bin/glib-compile-schemas ${MROOT}/usr/share/glib-2.0/schemas |
|
|
fi |
|
116 |
fi |
fi |
117 |
} |
} |
118 |
|
|
120 |
{ |
{ |
121 |
if [ -x ${MROOT}/usr/bin/gio-querymodules ] |
if [ -x ${MROOT}/usr/bin/gio-querymodules ] |
122 |
then |
then |
123 |
if [ -d ${BUILDDIR}/${PKGNAME}/binfiles/usr/$(mlibdir)/gio/modules ] |
echo "Updating glib gio modules ..." |
124 |
then |
${MROOT}/usr/bin/gio-querymodules ${MROOT}/usr/$(mlibdir)/gio/modules |
|
echo "Updating glib gio modules ..." |
|
|
${MROOT}/usr/bin/gio-querymodules ${MROOT}/usr/$(mlibdir)/gio/modules |
|
|
fi |
|
125 |
fi |
fi |
126 |
} |
} |
127 |
|
|