mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04: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:
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
|
@ -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
|
RUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Term/ANSIColor.pm:${PORTSDIR}/devel/p5-Term-ANSIColor
|
||||||
|
|
||||||
WRKSRC= ${WRKDIR}/${DISTNAME:S/_/-/}
|
WRKSRC= ${WRKDIR}/${DISTNAME:S/_/-/}
|
||||||
|
|
||||||
NO_BUILD= yes
|
NO_BUILD= yes
|
||||||
USE_PERL5= yes
|
USE_PERL5= yes
|
||||||
|
|
||||||
MAN1= colorize.1
|
MAN1= colorize.1
|
||||||
|
|
||||||
|
FMT?= /usr/bin/fmt
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
@${PERL} -pi -e "s|/etc/colorizerc|${PREFIX}/etc/colorizerc|; \
|
@${PERL} -pi -e "s|/etc/colorizerc|${PREFIX}/etc/colorizerc|; \
|
||||||
s|#!/usr/bin/perl|#!${PERL}|g" ${WRKSRC}/colorize.pl
|
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
|
@${PERL} -pi -e 's!colorize.pl!colorize!g' ${WRKSRC}/colorize.pl.1
|
||||||
|
|
||||||
do-install:
|
do-install:
|
||||||
${INSTALL_SCRIPT} ${WRKSRC}/colorize.pl ${PREFIX}/bin/colorize
|
@${INSTALL_SCRIPT} ${WRKSRC}/colorize.pl ${PREFIX}/bin/colorize
|
||||||
${INSTALL_DATA} ${WRKSRC}/colorizerc ${PREFIX}/etc/colorizerc.sample
|
@${INSTALL_DATA} ${WRKSRC}/colorizerc ${PREFIX}/etc/colorizerc.dist
|
||||||
${INSTALL_MAN} ${WRKSRC}/colorize.pl.1 ${PREFIX}/man/man1/colorize.1
|
.if !exists(${PREFIX}/etc/colorizerc)
|
||||||
|
@${INSTALL_DATA} ${WRKSRC}/colorizerc ${PREFIX}/etc/colorizerc
|
||||||
post-install:
|
.endif
|
||||||
@${CAT} ${PKGMESSAGE}
|
@${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>
|
.include <bsd.port.mk>
|
||||||
|
|
|
@ -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
|
To customize the colorize utility, you can make changes to
|
||||||
PREFIX/etc/colorizerc
|
/usr/local/etc/colorizerc
|
||||||
or user-specific changes in ~/.colorizerc
|
or user-specific changes in ~/.colorizerc
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
bin/colorize
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue