#!/bin/sh

if [ "x$2" = "xPOST-DEINSTALL" ]; then
	cd ${PKG_PREFIX}/lib/X11/fonts/local; /usr/X11R6/bin/mkfontdir
	/usr/X11R6/bin/xset fp rehash ||
	(
	 echo "**********************************************************"
	 echo "You should restart X server or do 'xset fp rehash' command"
	 echo "to enable this update."
	 echo "**********************************************************"
	)
	if [ "`wc -c ${PKG_PREFIX}/lib/X11/fonts/local/fonts.dir | awk '{print $1}'`" = 2 ]; then 
		rm -f ${PKG_PREFIX}/lib/X11/fonts/local/fonts.dir
	fi
fi
