diff options
author | lioux <lioux@FreeBSD.org> | 2001-08-11 00:43:58 +0800 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2001-08-11 00:43:58 +0800 |
commit | 0b8d3a063cbc12b712db2713e28b3da4cfb1b743 (patch) | |
tree | b8fb69d42ab8716e80809db30ea704a63e502702 | |
parent | d19a61d8fae4c1cf419e2658120b5b70bc7fabd6 (diff) | |
download | freebsd-ports-gnome-0b8d3a063cbc12b712db2713e28b3da4cfb1b743.tar.gz freebsd-ports-gnome-0b8d3a063cbc12b712db2713e28b3da4cfb1b743.tar.zst freebsd-ports-gnome-0b8d3a063cbc12b712db2713e28b3da4cfb1b743.zip |
o unecho Makefile commands
o re-phrase PKGMESSAGE and typo fix: PREFIX -> /usr/local
o gracefull install/deinstall of a default configuration file
PR: 28917
Submitted by: MAINTAINER,
Karaszi Istvan <raszi@bigfoot.com>
-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 |