diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2001-08-10 16:43:58 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2001-08-10 16:43:58 +0000 |
commit | f81a289da14b3c8081c3bdd19ad10413a4f4b97e (patch) | |
tree | 734b04108dc9fd79e95c8f7a12111c0ff6ee512c /sysutils/colorize | |
parent | 0c4aacbf1a13d5e3f05c4f14b34967cadefcf0c1 (diff) | |
download | ports-f81a289da14b3c8081c3bdd19ad10413a4f4b97e.tar.gz ports-f81a289da14b3c8081c3bdd19ad10413a4f4b97e.zip |
Notes
Diffstat (limited to 'sysutils/colorize')
-rw-r--r-- | sysutils/colorize/Makefile | 18 | ||||
-rw-r--r-- | sysutils/colorize/pkg-message | 4 | ||||
-rw-r--r-- | sysutils/colorize/pkg-plist | 4 |
3 files changed, 16 insertions, 10 deletions
diff --git a/sysutils/colorize/Makefile b/sysutils/colorize/Makefile index 2ed4b1320e6a..f7e7b25b5fe7 100644 --- a/sysutils/colorize/Makefile +++ b/sysutils/colorize/Makefile @@ -16,10 +16,14 @@ MAINTAINER= petef@databits.net RUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Term/ANSIColor.pm:${PORTSDIR}/devel/p5-Term-ANSIColor WRKSRC= ${WRKDIR}/${DISTNAME:S/_/-/} + NO_BUILD= yes USE_PERL5= yes + MAN1= colorize.1 +FMT?= /usr/bin/fmt + post-patch: @${PERL} -pi -e "s|/etc/colorizerc|${PREFIX}/etc/colorizerc|; \ s|#!/usr/bin/perl|#!${PERL}|g" ${WRKSRC}/colorize.pl @@ -27,11 +31,13 @@ post-patch: @${PERL} -pi -e 's!colorize.pl!colorize!g' ${WRKSRC}/colorize.pl.1 do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/colorize.pl ${PREFIX}/bin/colorize - ${INSTALL_DATA} ${WRKSRC}/colorizerc ${PREFIX}/etc/colorizerc.sample - ${INSTALL_MAN} ${WRKSRC}/colorize.pl.1 ${PREFIX}/man/man1/colorize.1 - -post-install: - @${CAT} ${PKGMESSAGE} + @${INSTALL_SCRIPT} ${WRKSRC}/colorize.pl ${PREFIX}/bin/colorize + @${INSTALL_DATA} ${WRKSRC}/colorizerc ${PREFIX}/etc/colorizerc.dist +.if !exists(${PREFIX}/etc/colorizerc) + @${INSTALL_DATA} ${WRKSRC}/colorizerc ${PREFIX}/etc/colorizerc +.endif + @${INSTALL_MAN} ${WRKSRC}/colorize.pl.1 ${PREFIX}/man/man1/colorize.1 + @${PERL} -pi -e 's,PREFIX,${PREFIX},' ${PKGMESSAGE} + @${SED} s!/usr/local/!${PREFIX}/! ${PKGMESSAGE} | ${FMT} .include <bsd.port.mk> diff --git a/sysutils/colorize/pkg-message b/sysutils/colorize/pkg-message index 13dff4830818..eb0ebdb7d466 100644 --- a/sysutils/colorize/pkg-message +++ b/sysutils/colorize/pkg-message @@ -1,7 +1,5 @@ --------------------------------------------------------------------------- -You will need to copy PREFIX/etc/colorizerc.sample to PREFIX/etc/colorizerc - To customize the colorize utility, you can make changes to - PREFIX/etc/colorizerc + /usr/local/etc/colorizerc or user-specific changes in ~/.colorizerc --------------------------------------------------------------------------- diff --git a/sysutils/colorize/pkg-plist b/sysutils/colorize/pkg-plist index f1abf96676cb..39cad4d630a0 100644 --- a/sysutils/colorize/pkg-plist +++ b/sysutils/colorize/pkg-plist @@ -1,2 +1,4 @@ bin/colorize -etc/colorizerc.sample +@unexec if cmp -s %D/etc/colorizerc %D/etc/colorizerc.dist; then rm -f %D/etc/colorizerc; fi +etc/colorizerc.dist +@exec if [ ! -f %D/etc/colorizerc ]; then cp -f %D/etc/%f %D/etc/colorizerc; fi |