aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/logtool-devel/Makefile5
-rw-r--r--sysutils/logtool-devel/pkg-plist22
-rw-r--r--sysutils/logtool/Makefile5
-rw-r--r--sysutils/logtool/pkg-plist22
4 files changed, 42 insertions, 12 deletions
diff --git a/sysutils/logtool-devel/Makefile b/sysutils/logtool-devel/Makefile
index 9203c20e3885..483b6404dac0 100644
--- a/sysutils/logtool-devel/Makefile
+++ b/sysutils/logtool-devel/Makefile
@@ -27,6 +27,11 @@ post-patch:
post-install:
${INSTALL_MAN} ${WRKSRC}/doc/logtool.1 ${PREFIX}/man/man1
+ @${CP} ${WRKSRC}/conf/logtool.conf ${PREFIX}/etc/logtool/logtool.conf.dist
+ @${CP} ${WRKSRC}/conf/exclude ${PREFIX}/etc/logtool/exclude.dist
+ @${CP} ${WRKSRC}/conf/green ${PREFIX}/etc/logtool/green.dist
+ @${CP} ${WRKSRC}/conf/include ${PREFIX}/etc/logtool/include.dist
+ @${CP} ${WRKSRC}/conf/yellow ${PREFIX}/etc/logtool/yellow.dist
.if !defined(NOPORTDOCS)
@${ECHO_MSG} "===> Installing logtool docs in ${PREFIX}/share/doc/logtool"
@${MKDIR} ${PREFIX}/share/doc/logtool && ${CHMOD} a+rx ${PREFIX}/share/doc/logtool
diff --git a/sysutils/logtool-devel/pkg-plist b/sysutils/logtool-devel/pkg-plist
index 3d13413c6013..cbeb840d8745 100644
--- a/sysutils/logtool-devel/pkg-plist
+++ b/sysutils/logtool-devel/pkg-plist
@@ -1,11 +1,21 @@
bin/logtool
bin/logtail
-etc/logtool/exclude
-etc/logtool/green
-etc/logtool/include
-etc/logtool/logtool.conf
-etc/logtool/yellow
-@dirrm etc/logtool
+@unexec if cmp -s %D/etc/logtool/exclude %D/etc/logtool/exclude.dist; then rm -f %D/etc/logtool/exclude; fi
+etc/logtool/exclude.dist
+@exec [ -f %B/exclude ] || cp %B/%f %B/exclude
+@unexec if cmp -s %D/etc/logtool/green %D/etc/logtool/green.dist; then rm -f %D/etc/logtool/green; fi
+etc/logtool/green.dist
+@exec [ -f %B/green ] || cp %B/%f %B/green
+@unexec if cmp -s %D/etc/logtool/include %D/etc/logtool/include.dist; then rm -f %D/etc/logtool/include; fi
+etc/logtool/include.dist
+@exec [ -f %B/include ] || cp %B/%f %B/include
+@unexec if cmp -s %D/etc/logtool/logtool.conf %D/etc/logtool/logtool.conf.dist; then rm -f %D/etc/logtool/logtool.conf; fi
+etc/logtool/logtool.conf.dist
+@exec [ -f %B/logtool.conf ] || cp %B/%f %B/logtool.conf
+@unexec if cmp -s %D/etc/logtool/yellow %D/etc/logtool/yellow.dist; then rm -f %D/etc/logtool/yellow; fi
+etc/logtool/yellow.dist
+@exec [ -f %B/yellow ] || cp %B/%f %B/yellow
+@unexec rmdir %D/etc/logtool 2>/dev/null || true
%%PORTDOCS%%share/doc/logtool/examples/README
%%PORTDOCS%%share/doc/logtool/examples/cronjob.genwebpage.sh
%%PORTDOCS%%share/doc/logtool/examples/cronjob.emailreport.sh
diff --git a/sysutils/logtool/Makefile b/sysutils/logtool/Makefile
index 9203c20e3885..483b6404dac0 100644
--- a/sysutils/logtool/Makefile
+++ b/sysutils/logtool/Makefile
@@ -27,6 +27,11 @@ post-patch:
post-install:
${INSTALL_MAN} ${WRKSRC}/doc/logtool.1 ${PREFIX}/man/man1
+ @${CP} ${WRKSRC}/conf/logtool.conf ${PREFIX}/etc/logtool/logtool.conf.dist
+ @${CP} ${WRKSRC}/conf/exclude ${PREFIX}/etc/logtool/exclude.dist
+ @${CP} ${WRKSRC}/conf/green ${PREFIX}/etc/logtool/green.dist
+ @${CP} ${WRKSRC}/conf/include ${PREFIX}/etc/logtool/include.dist
+ @${CP} ${WRKSRC}/conf/yellow ${PREFIX}/etc/logtool/yellow.dist
.if !defined(NOPORTDOCS)
@${ECHO_MSG} "===> Installing logtool docs in ${PREFIX}/share/doc/logtool"
@${MKDIR} ${PREFIX}/share/doc/logtool && ${CHMOD} a+rx ${PREFIX}/share/doc/logtool
diff --git a/sysutils/logtool/pkg-plist b/sysutils/logtool/pkg-plist
index 3d13413c6013..cbeb840d8745 100644
--- a/sysutils/logtool/pkg-plist
+++ b/sysutils/logtool/pkg-plist
@@ -1,11 +1,21 @@
bin/logtool
bin/logtail
-etc/logtool/exclude
-etc/logtool/green
-etc/logtool/include
-etc/logtool/logtool.conf
-etc/logtool/yellow
-@dirrm etc/logtool
+@unexec if cmp -s %D/etc/logtool/exclude %D/etc/logtool/exclude.dist; then rm -f %D/etc/logtool/exclude; fi
+etc/logtool/exclude.dist
+@exec [ -f %B/exclude ] || cp %B/%f %B/exclude
+@unexec if cmp -s %D/etc/logtool/green %D/etc/logtool/green.dist; then rm -f %D/etc/logtool/green; fi
+etc/logtool/green.dist
+@exec [ -f %B/green ] || cp %B/%f %B/green
+@unexec if cmp -s %D/etc/logtool/include %D/etc/logtool/include.dist; then rm -f %D/etc/logtool/include; fi
+etc/logtool/include.dist
+@exec [ -f %B/include ] || cp %B/%f %B/include
+@unexec if cmp -s %D/etc/logtool/logtool.conf %D/etc/logtool/logtool.conf.dist; then rm -f %D/etc/logtool/logtool.conf; fi
+etc/logtool/logtool.conf.dist
+@exec [ -f %B/logtool.conf ] || cp %B/%f %B/logtool.conf
+@unexec if cmp -s %D/etc/logtool/yellow %D/etc/logtool/yellow.dist; then rm -f %D/etc/logtool/yellow; fi
+etc/logtool/yellow.dist
+@exec [ -f %B/yellow ] || cp %B/%f %B/yellow
+@unexec rmdir %D/etc/logtool 2>/dev/null || true
%%PORTDOCS%%share/doc/logtool/examples/README
%%PORTDOCS%%share/doc/logtool/examples/cronjob.genwebpage.sh
%%PORTDOCS%%share/doc/logtool/examples/cronjob.emailreport.sh