1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

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>
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2001-08-10 16:43:58 +00:00
parent 0c4aacbf1a
commit f81a289da1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=46048
3 changed files with 16 additions and 10 deletions

View File

@ -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>

View File

@ -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
---------------------------------------------------------------------------

View File

@ -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