summaryrefslogtreecommitdiff
path: root/fonts/ghostscript-cmaps
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-06-15 20:40:15 +0000
committerjlam <jlam@pkgsrc.org>2006-06-15 20:40:15 +0000
commit827643d4bb8f5f83c28919b7df0d42108769e37d (patch)
treefdcc07230f85f6fc9861a7659692fa83b1801fd4 /fonts/ghostscript-cmaps
parent16435dbba43f2f98501e2daefad890a6542aab31 (diff)
downloadpkgsrc-827643d4bb8f5f83c28919b7df0d42108769e37d.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-cmaps')
-rw-r--r--fonts/ghostscript-cmaps/DEINSTALL18
-rw-r--r--fonts/ghostscript-cmaps/INSTALL21
-rw-r--r--fonts/ghostscript-cmaps/Makefile4
3 files changed, 23 insertions, 20 deletions
diff --git a/fonts/ghostscript-cmaps/DEINSTALL b/fonts/ghostscript-cmaps/DEINSTALL
new file mode 100644
index 00000000000..153f73d96a8
--- /dev/null
+++ b/fonts/ghostscript-cmaps/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-cmaps | ${GREP} "/Resource/CMap/" |
+ while read src; do
+ base=`${BASENAME} $src`
+ dest="${GS_RESOURCEDIR}/CMap/$base"
+ ${RM} -f $dest
+ done
+ ;;
+esac
diff --git a/fonts/ghostscript-cmaps/INSTALL b/fonts/ghostscript-cmaps/INSTALL
index aca4e99dc24..6e54273bd10 100644
--- a/fonts/ghostscript-cmaps/INSTALL
+++ b/fonts/ghostscript-cmaps/INSTALL
@@ -1,32 +1,19 @@
#!/bin/sh
#
-# $NetBSD: INSTALL,v 1.2 2002/09/13 22:38:33 jlam Exp $
+# $NetBSD: INSTALL,v 1.3 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-cmaps | \
- ${AWK} '/File:.*\/Resource\/CMap\// { print $2 }' \
-`
-
case ${STAGE} in
POST-INSTALL)
- for file in ${FONTFILES}; do
- base=`${BASENAME} $file`
+ ${PKG_INFO} -qL adobe-cmaps | ${GREP} "/Resource/CMap/" |
+ while read src; do
+ base=`${BASENAME} $src`
dest="${GS_RESOURCEDIR}/CMap/$base"
- src="../../../../$file"
${RM} -f $dest
${LN} -sf $src $dest
done
;;
-
-DEINSTALL)
- for file in ${FONTFILES}; do
- base=`${BASENAME} $file`
- dest="${GS_RESOURCEDIR}/CMap/$base"
- ${RM} -f $dest
- done
- ;;
esac
diff --git a/fonts/ghostscript-cmaps/Makefile b/fonts/ghostscript-cmaps/Makefile
index e6622759d5f..e114ce75a08 100644
--- a/fonts/ghostscript-cmaps/Makefile
+++ b/fonts/ghostscript-cmaps/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2006/03/14 01:14:28 jlam Exp $
+# $NetBSD: Makefile,v 1.13 2006/06/15 20:40:15 jlam Exp $
DISTNAME= ghostscript-cmaps-20020913
PKGREVISION= 2
@@ -21,8 +21,6 @@ USE_TOOLS+= gs:run
NO_CONFIGURE= yes
NO_BUILD= yes
-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}