diff options
author | Emanuel Haupt <ehaupt@FreeBSD.org> | 2006-01-09 12:24:28 +0000 |
---|---|---|
committer | Emanuel Haupt <ehaupt@FreeBSD.org> | 2006-01-09 12:24:28 +0000 |
commit | f533f226e5276f8f6689cee15312e1c78821ae09 (patch) | |
tree | 0b1a6aa3c2f66e9d34f7822a61b9e41348cad39e /textproc | |
parent | e11514bf08ae67497028a3576a7dde578725c0ad (diff) |
- Patch colordiff to use ${PREFIX}/etc as config directory instead of
/etc [1]
- Move colordiffrc from ${EXAMPLESDIR} to ${PREFIX}/etc,
- install ${PREFIX}/etc/colordiffrc.default and
- preserve ${PREFIX}/etc/colordiffrc on install/update/deinstall if it
differs to ${PREFIX}/etc/colordiffrc.default
Suggested by: martinko <martinkov@pobox.sk> [1]
Notes
Notes:
svn path=/head/; revision=153127
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/colordiff/Makefile | 15 | ||||
-rw-r--r-- | textproc/colordiff/pkg-plist | 4 |
2 files changed, 13 insertions, 6 deletions
diff --git a/textproc/colordiff/Makefile b/textproc/colordiff/Makefile index 084364a06f5a..bbcf8245bb75 100644 --- a/textproc/colordiff/Makefile +++ b/textproc/colordiff/Makefile @@ -7,6 +7,7 @@ PORTNAME= colordiff PORTVERSION= 1.0.5 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -18,8 +19,6 @@ USE_PERL5= yes USE_REINPLACE= yes NO_BUILD= yes -PLIST_DIRS= %%EXAMPLESDIR%% -PLIST_FILES= bin/colordiff %%EXAMPLESDIR%%/colordiffrc MAN1= colordiff.1 .include <bsd.port.pre.mk> @@ -30,13 +29,17 @@ RUN_DEPENDS= ${BUILD_DEPENDS} .endif post-patch: - @${REINPLACE_CMD} -e 's|/usr/local/bin/perl|${PERL}|' \ - ${WRKSRC}/${PORTNAME}.pl + @${REINPLACE_CMD} -e \ + 's|/usr/local/bin/perl|${PERL}|; s|/etc|${PREFIX}/etc|' \ + ${WRKSRC}/${PORTNAME}.pl \ + ${WRKSRC}/${MAN1} do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.pl ${PREFIX}/bin/${PORTNAME} ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${PREFIX}/man/man1 - ${MKDIR} ${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/colordiffrc ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/colordiffrc ${PREFIX}/etc/colordiffrc.default +.if !exists(${PREFIX}/etc/colordiffrc) + ${INSTALL_DATA} ${WRKSRC}/colordiffrc ${PREFIX}/etc +.endif .include <bsd.port.post.mk> diff --git a/textproc/colordiff/pkg-plist b/textproc/colordiff/pkg-plist new file mode 100644 index 000000000000..c6e4e6997b57 --- /dev/null +++ b/textproc/colordiff/pkg-plist @@ -0,0 +1,4 @@ +bin/colordiff +@unexec if cmp -s %D/etc/colordiffrc %D/etc/colordiffrc.default; then rm -f %D/etc/colordiffrc; fi +etc/colordiffrc.default +@exec [ -f %B/colordiffrc ] || cp %B/%f %B/colordiffrc |