summaryrefslogtreecommitdiff
path: root/chat/ircII/Makefile
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-06-14 14:23:32 +0000
committerjlam <jlam@pkgsrc.org>2006-06-14 14:23:32 +0000
commit8e7eb9771cba78807454263ea7b611cea41b303d (patch)
tree0b37158cf3983b2c26233ed3804b83586fc3f6de /chat/ircII/Makefile
parente36dc4fab3b4c0c54d1933dd21aeef034d2b59da (diff)
downloadpkgsrc-8e7eb9771cba78807454263ea7b611cea41b303d.tar.gz
Manage compression of the help files using the doc-compress script
and be more precise about which files are handled instead of touching all the files in share/irc/help. Also, use PLIST_SUBST instead of manually replacing @GZ@ in the PLIST.
Diffstat (limited to 'chat/ircII/Makefile')
-rw-r--r--chat/ircII/Makefile25
1 files changed, 13 insertions, 12 deletions
diff --git a/chat/ircII/Makefile b/chat/ircII/Makefile
index d595840554a..1b2997e3ad5 100644
--- a/chat/ircII/Makefile
+++ b/chat/ircII/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2006/03/04 21:29:03 jlam Exp $
+# $NetBSD: Makefile,v 1.43 2006/06/14 14:23:32 jlam Exp $
DISTNAME= ircii-${VERS}
PKGNAME= ircII-${VERS}
@@ -32,8 +32,6 @@ CONFIGURE_ARGS+= --with-default-server=${DEFAULT_IRC_SERVER:Q}
# (Leave the line in to still get it into the README-IPv6.html!)
BUILD_DEFS+= USE_INET6
-PLIST_SRC= ${WRKDIR}/PLIST.tmp
-
.include "options.mk"
# Allow customizations from ${MAKECONF}
@@ -46,16 +44,19 @@ LDFLAGS.SunOS+= -lsocket -lnsl
CONFIGURE_ARGS+= --with-non-blocking=none
.endif
-pre-install:
- @(if [ "X${MANZ}" != X"" ]; then \
- GZSUFFIX=.gz; \
- fi; \
- ${SED} -e 's|@.GZ@|'$$GZSUFFIX'|g' ${PKGDIR}/PLIST > ${PLIST_SRC})
+# Optionally install compressed help files if MANZ is defined.
+.if defined(MANZ)
+PLIST_SUBST+= GZSUFFIX=".gz"
+DOC_COMPRESS_ARGS= -z ${PREFIX}
+.else
+PLIST_SUBST+= GZSUFFIX=
+DOC_COMPRESS_ARGS= ${PREFIX}
+.endif
post-install:
- @if [ "X${MANZ}" != X"" ]; then \
- ${ECHO} Compressing help files; \
- ${FIND} ${PREFIX}/share/irc/help -type f -print | ${XARGS} ${GZIP_CMD}; \
- fi
+ ${AWK} '/^share\/irc\/help\// { sub("\\$${GZSUFFIX}$$", ""); print }' \
+ ${PLIST_SRC} | \
+ ${SETENV} PATH=${PATH:Q} PKG_VERBOSE=${PKG_VERBOSE:Q} \
+ ${SH} ${PKGSRCDIR}/mk/plist/doc-compress ${DOC_COMPRESS_ARGS}
.include "../../mk/bsd.pkg.mk"