aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortaoka <taoka@FreeBSD.org>2000-08-25 13:28:35 +0800
committertaoka <taoka@FreeBSD.org>2000-08-25 13:28:35 +0800
commitdca8f7be7cd0d64224d3ad365f88e12f946c6bb2 (patch)
tree9ded5fbfe041066ce30723460f54fcff766f7e00
parent60a627228d7341ce8511ca5448798ff3f5d4bf82 (diff)
downloadfreebsd-ports-gnome-dca8f7be7cd0d64224d3ad365f88e12f946c6bb2.tar.gz
freebsd-ports-gnome-dca8f7be7cd0d64224d3ad365f88e12f946c6bb2.tar.zst
freebsd-ports-gnome-dca8f7be7cd0d64224d3ad365f88e12f946c6bb2.zip
To delete extra files and directories after pkg_delete
Obtained from: asami
-rw-r--r--x11-fonts/intlfonts/files/DEINSTALL.tmpl5
-rw-r--r--x11-fonts/intlfonts/pkg-plist4
2 files changed, 9 insertions, 0 deletions
diff --git a/x11-fonts/intlfonts/files/DEINSTALL.tmpl b/x11-fonts/intlfonts/files/DEINSTALL.tmpl
index b3ce13970536..e4eae17628cb 100644
--- a/x11-fonts/intlfonts/files/DEINSTALL.tmpl
+++ b/x11-fonts/intlfonts/files/DEINSTALL.tmpl
@@ -10,4 +10,9 @@ if [ "x$2" = "xPOST-DEINSTALL" ]; then
echo "to enable this update."
echo "**********************************************************"
)
+ [ `wc -c ${PKG_PREFIX}/%%FONTSDIR%%/fonts.dir | awk '{print $1}'` = 2 ] && rm -f ${PKG_PREFIX}/%%FONTSDIR%%/fonts.dir
+ [ `wc -c ${PKG_PREFIX}/%%T1_FONTSDIR%%/fonts.dir | awk '{print $1}'` = 2 ] && rm -f ${PKG_PREFIX}/%%T1_FONTSDIR%%/fonts.dir
+ [ `wc -c ${PKG_PREFIX}/%%T1_FONTSDIR%%/fonts.scale | awk '{print $1}'` = 2 ] && rm -f ${PKG_PREFIX}/%%T1_FONTSDIR%%/fonts.scale
+# Remove a backup file made by type1inst
+ rm -f ${PKG_PREFIX}/%%T1_FONTSDIR%%/fonts.scale.bak
fi
diff --git a/x11-fonts/intlfonts/pkg-plist b/x11-fonts/intlfonts/pkg-plist
index 3725af284936..c1d1d9e6f078 100644
--- a/x11-fonts/intlfonts/pkg-plist
+++ b/x11-fonts/intlfonts/pkg-plist
@@ -1,3 +1,6 @@
+@exec [ -f %D/%%FONTSDIR%%/fonts.dir ] || mv %D/%%FONTSDIR%%/fonts.dir %D/%%FONTSDIR%%/fonts.dir.org
+@exec [ -f %D/%%T1_FONTSDIR%%/fonts.dir ] || mv %D/%%T1_FONTSDIR%%/fonts.dir %D/%%FONTSDIR%%/fonts.dir.org
+@exec [ -f %D/%%T1_FONTSDIR%%/fonts.scale ] || mv %D/%%T1_FONTSDIR%%/fonts.scale %D/%%FONTSDIR%%/fonts.scale.org
%%FONTSDIR%%/a18rk.pcf.gz
%%FONTSDIR%%/a18rkb.pcf.gz
%%FONTSDIR%%/a18rki.pcf.gz
@@ -221,3 +224,4 @@
%%DOCDIR%%/Emacs.ap
%%DOCDIR%%/NEWS
@dirrm %%DOCDIR%%
+@dirrm %%TT_FONTSDIR%%