diff options
Diffstat (limited to 'Keywords')
-rw-r--r-- | Keywords/fc.ucl | 19 | ||||
-rw-r--r-- | Keywords/fontsdir.ucl | 27 |
2 files changed, 46 insertions, 0 deletions
diff --git a/Keywords/fc.ucl b/Keywords/fc.ucl new file mode 100644 index 000000000000..73f659fb36d5 --- /dev/null +++ b/Keywords/fc.ucl @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# MAINTAINER: x11@FreeBSD.org + +actions: [dir] +post-install: <<EOD + case "%@" in + /*) fontsdir="%@" ;; + *) fontsdir="%D/%@" ;; + esac + fc-cache -fs ${fontsdir} 2>/dev/null || true +EOD +post-deinstall: <<EOD + case "%@" in + /*) fontsdir="%@" ;; + *) fontsdir="%D/%@" ;; + esac + fc-cache -fs ${fontsdir} 2>/dev/null || true +EOD diff --git a/Keywords/fontsdir.ucl b/Keywords/fontsdir.ucl new file mode 100644 index 000000000000..d68b4a73999c --- /dev/null +++ b/Keywords/fontsdir.ucl @@ -0,0 +1,27 @@ +# $FreeBSD$ +# +# MAINTAINER: x11@FreeBSD.org + +actions: [dir] +post-install: <<EOD + case "%@" in + /*) fontsdir="%@" ;; + *) fontsdir="%D/%@" ;; + esac + mkfontscale ${fontsdir} 2>/dev/null || true + mkfontdir ${fontsdir} 2>/dev/null || true +EOD +post-deinstall: <<EOD + case "%@" in + /*) fontsdir="%@" ;; + *) fontsdir="%D/%@" ;; + esac + mkfontscale ${fontsdir} 2>/dev/null || true + if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then + rm ${fontsdir}/fonts.scale + fi + mkfontdir ${fontsdir} 2>/dev/null || true + if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then + rm ${fontsdir}/fonts.dir + fi +EOD |