aboutsummaryrefslogtreecommitdiffstats
path: root/Keywords/fcfontsdir.ucl
diff options
context:
space:
mode:
Diffstat (limited to 'Keywords/fcfontsdir.ucl')
-rw-r--r--Keywords/fcfontsdir.ucl21
1 files changed, 21 insertions, 0 deletions
diff --git a/Keywords/fcfontsdir.ucl b/Keywords/fcfontsdir.ucl
new file mode 100644
index 000000000000..542465aea714
--- /dev/null
+++ b/Keywords/fcfontsdir.ucl
@@ -0,0 +1,21 @@
+# $FreeBSD$
+#
+# MAINTAINER: x11@FreeBSD.org
+
+actions: [dirrmtry]
+post-install: <<EOD
+ fc-cache -s %D/%@ 2>/dev/null || true
+ mkfontscale %D/%@ 2>/dev/null || true
+ mkfontdir %D/%@ 2>/dev/null || true
+EOD
+post-deinstall: <<EOD
+ fc-cache -s %D/%@ 2>/dev/null || true
+ mkfontscale %D/%@ 2>/dev/null || true
+ if [ -e %D/%@/fonts.scale -a "`stat -f '%%z' %D/%@/fonts.scale 2>/dev/null`" = '2' ]; then
+ rm %D/%@/fonts.scale
+ fi
+ mkfontdir %D/%@ 2>/dev/null || true
+ if [ -e %D/%@/fonts.dir -a "`stat -f '%%z' %D/%@/fonts.dir 2>/dev/null`" = '2' ]; then
+ rm %D/%@/fonts.dir
+ fi
+EOD