summaryrefslogtreecommitdiff
path: root/fonts/ghostscript-cidfonts
diff options
context:
space:
mode:
authorjlam <jlam>2006-06-15 20:40:15 +0000
committerjlam <jlam>2006-06-15 20:40:15 +0000
commit932a82763f1d3275bf2edcbf14357baabc0b8ab5 (patch)
treefdcc07230f85f6fc9861a7659692fa83b1801fd4 /fonts/ghostscript-cidfonts
parent71086553bd6cf992cc65040cf6012e9a3614375c (diff)
downloadpkgsrc-932a82763f1d3275bf2edcbf14357baabc0b8ab5.tar.gz
Split out deinstall portions of INSTALL scripts into DEINSTALL scripts.
This avoids the need for a confusing line of the form: DEINSTALL_TEMPLATE+= path/to/INSTALL in the package Makefile, and actually removes the need to specify it altogether since by convention, the existence of the DEINSTALL script is enough to add it to DEINSTALL_TEMPLATE.
Diffstat (limited to 'fonts/ghostscript-cidfonts')
-rw-r--r--fonts/ghostscript-cidfonts/DEINSTALL18
-rw-r--r--fonts/ghostscript-cidfonts/INSTALL23
-rw-r--r--fonts/ghostscript-cidfonts/Makefile4
3 files changed, 24 insertions, 21 deletions
diff --git a/fonts/ghostscript-cidfonts/DEINSTALL b/fonts/ghostscript-cidfonts/DEINSTALL
new file mode 100644
index 00000000000..28c6a69ac56
--- /dev/null
+++ b/fonts/ghostscript-cidfonts/DEINSTALL
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2006/06/15 20:40:15 jlam Exp $
+
+ADOBE_RESOURCEDIR="@ADOBE_RESOURCEDIR@"
+GS_RESOURCEDIR="@GS_RESOURCEDIR@"
+PKG_INFO="@PKG_INFO@"
+
+case ${STAGE} in
+DEINSTALL)
+ ${PKG_INFO} -qL adobe-cidfonts | ${GREP} "/Resource/CIDFont/" |
+ while read src; do
+ base=`${BASENAME} $src`
+ dest="${GS_RESOURCEDIR}/CIDFont/$base"
+ ${RM} -f $dest
+ done
+ ;;
+esac
diff --git a/fonts/ghostscript-cidfonts/INSTALL b/fonts/ghostscript-cidfonts/INSTALL
index b4150270d6c..b03909424d2 100644
--- a/fonts/ghostscript-cidfonts/INSTALL
+++ b/fonts/ghostscript-cidfonts/INSTALL
@@ -1,32 +1,19 @@
#!/bin/sh
#
-# $NetBSD: INSTALL,v 1.1.1.1 2002/09/13 22:35:01 jlam Exp $
+# $NetBSD: INSTALL,v 1.2 2006/06/15 20:40:15 jlam Exp $
ADOBE_RESOURCEDIR="@ADOBE_RESOURCEDIR@"
GS_RESOURCEDIR="@GS_RESOURCEDIR@"
PKG_INFO="@PKG_INFO@"
-FONTFILES=` \
- ${PKG_INFO} -f adobe-cidfonts | \
- ${AWK} '/File:.*\/Resource\/CIDFont\// { print $2 }' \
-`
-
case ${STAGE} in
POST-INSTALL)
- for file in ${FONTFILES}; do
- base=`${BASENAME} $file`
- dest="${GS_RESOURCEDIR}/CIDFont/$base"
- src="../../../../$file"
- ${RM} -f $dest
- ${LN} -sf $src $dest
- done
- ;;
-
-DEINSTALL)
- for file in ${FONTFILES}; do
- base=`${BASENAME} $file`
+ ${PKG_INFO} -qL adobe-cidfonts | ${GREP} "/Resource/CIDFont/" |
+ while read src; do
+ base=`${BASENAME} $src`
dest="${GS_RESOURCEDIR}/CIDFont/$base"
${RM} -f $dest
+ ${LN} -fs $src $dest
done
;;
esac
diff --git a/fonts/ghostscript-cidfonts/Makefile b/fonts/ghostscript-cidfonts/Makefile
index cbb5e6f69eb..48bbf579412 100644
--- a/fonts/ghostscript-cidfonts/Makefile
+++ b/fonts/ghostscript-cidfonts/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2006/03/14 01:14:28 jlam Exp $
+# $NetBSD: Makefile,v 1.12 2006/06/15 20:40:15 jlam Exp $
DISTNAME= ghostscript-cidfonts-20000901
PKGREVISION= 2
@@ -21,8 +21,6 @@ NO_CONFIGURE= yes
NO_BUILD= yes
USE_TOOLS+= gs:run
-DEINSTALL_TEMPLATE+= ${PKGDIR}/INSTALL
-
FILES_SUBST+= ADOBE_RESOURCEDIR=${ADOBE_RESOURCEDIR:Q}
FILES_SUBST+= GS_RESOURCEDIR=${GS_RESOURCEDIR:Q}
FILES_SUBST+= PKG_INFO=${PKG_INFO:Q}