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

View file

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