11 |
>= dev-util/intltool-0.40 |
>= dev-util/intltool-0.40 |
12 |
>= sys-dev/gettext-0.17" |
>= sys-dev/gettext-0.17" |
13 |
|
|
14 |
sminclude mtools |
sminclude mtools gtk2 fdo-mime |
15 |
|
|
16 |
case ${PNAME} in |
case ${PNAME} in |
17 |
thunar-*-plugin) URISUBDIR="thunar-plugins" ;; |
thunar-*-plugin) URISUBDIR="thunar-plugins" ;; |
30 |
) |
) |
31 |
|
|
32 |
# special functions needed by postinstall|postremove |
# special functions needed by postinstall|postremove |
33 |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} xfce_update_desktop_db xfce_update_mime_db xfce_update_icon_cache xfce_postinstall xfce_postremove" |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} xfce_postinstall xfce_postremove" |
34 |
|
|
35 |
xfce_configure() |
xfce_configure() |
36 |
{ |
{ |
79 |
done |
done |
80 |
} |
} |
81 |
|
|
|
xfce_update_desktop_db() |
|
|
{ |
|
|
# update desktop db |
|
|
if [ -x ${MROOT}/usr/bin/update-desktop-database ] |
|
|
then |
|
|
echo "Updating desktop mime database ..." |
|
|
${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications |
|
|
fi |
|
|
} |
|
|
|
|
|
xfce_update_mime_db() |
|
|
{ |
|
|
# update mime db |
|
|
if [ -x ${MROOT}/usr/bin/update-mime-database ] |
|
|
then |
|
|
echo "Updating shared mime info database ..." |
|
|
${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime |
|
|
fi |
|
|
} |
|
|
|
|
|
xfce_update_icon_cache() |
|
|
{ |
|
|
if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] |
|
|
then |
|
|
pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
|
|
local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
|
|
popd &> /dev/null |
|
|
|
|
|
# abort here, if no icons where found |
|
|
[[ -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 |
|
|
fi |
|
|
} |
|
|
|
|
82 |
xfce_postinstall() |
xfce_postinstall() |
83 |
{ |
{ |
84 |
xfce_update_desktop_db |
fdo-mime_update_desktop_db |
85 |
xfce_update_mime_db |
fdo-mime_update_mime_db |
86 |
xfce_update_icon_cache |
gtk2_update_icon_cache |
87 |
} |
} |
88 |
|
|
89 |
xfce_postremove() |
xfce_postremove() |
90 |
{ |
{ |
91 |
xfce_update_desktop_db |
fdo-mime_update_desktop_db |
92 |
xfce_update_mime_db |
fdo-mime_update_mime_db |
93 |
xfce_update_icon_cache |
gtk2_update_icon_cache |
94 |
} |
} |
95 |
|
|
96 |
export_inherits xfce src_prepare src_compile src_check src_install postinstall postremove |
export_inherits xfce src_prepare src_compile src_check src_install postinstall postremove |