xbps-triggers: x11-fonts: do not remove generated files and also update at post-remove.

This commit is contained in:
Juan RP 2013-01-29 10:25:54 +01:00
parent 2e3b8ac000
commit 7f3ab8ffb7
2 changed files with 6 additions and 21 deletions

View file

@ -24,7 +24,7 @@ fccache=usr/bin/fc-cache
case "$ACTION" in
targets)
echo "post-install pre-remove"
echo "post-install post-remove"
;;
run)
if [ ! -x ${mkfontdir} -a ! -x ${mkfontscale} ]; then
@ -34,27 +34,14 @@ run)
[ -z "${font_dirs}" ] && exit 0
case "$TARGET" in
post-install)
post-install|post-remove)
for dir in ${font_dirs}; do
echo "Building ${dir}/fonts.dir..."
${mkfontdir} .${dir} || exit $?
${mkfontdir} .${dir}
echo "Building ${dir}/fonts.scale..."
${mkfontscale} .${dir} || exit $?
${mkfontscale} .${dir}
echo "Updating fontconfig's cache..."
${fccache} .${dir} 2>/dev/null
done
;;
pre-remove)
for dir in ${font_dirs}; do
if [ -f .${dir}/fonts.dir ]; then
rm -f .${dir}/fonts.dir
fi
if [ -f .${dir}/fonts.scale ]; then
rm -f .${dir}/fonts.scale
fi
if [ -f .${dir}/encodings.dir ]; then
rm -f .${dir}/encodings.dir
fi
${fccache} -fs
done
;;
esac

View file

@ -1,13 +1,11 @@
# Template file for 'xbps-triggers'
pkgname=xbps-triggers
version=0.57
version=0.58
revision=1
short_desc="XBPS triggers"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://code.google.com/p/xbps"
license="Simplified BSD"
long_desc="
This package installs the triggers used by the XBPS binary packages."
noarch=yes
noextract=yes