Fix a pkg-plist issue whereby the upline installer conditionally installed

syslog-ng.conf. It is now installed as syslog-ng.conf.dist. The user may
choose either this file or syslog-ng.conf.sample as a template for a new
syslog-ng.conf. By default syslog-ng.conf is copied from syslog-ng.conf.sample.

Feature safe:	yes
This commit is contained in:
Cy Schubert 2011-01-21 05:45:17 +00:00
parent 983aa47184
commit 00f05e10ad
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=268073
3 changed files with 18 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= syslog-ng
PORTVERSION= 3.2.2
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.balabit.com/downloads/files/syslog-ng/sources/$(PORTVERSION)/source/
PKGNAMESUFFIX= 3
@ -103,6 +104,7 @@ CONFIGURE_ARGS+= --disable-sql
post-patch:
@${REINPLACE_CMD} -e 's:libnet-config:libnet115-config:g' ${WRKSRC}/configure
@${MV} ${WRKSRC}/scl/syslog-ng.conf ${WRKSRC}/scl/syslog-ng.conf.dist
.if ${OSVERSION} >= 900007
@${REINPLACE_CMD} \
-e 's|utmp|utmpx|' -e 's|getutent|getutxent|' \
@ -125,6 +127,9 @@ post-install:
@if [ ! -f ${PREFIX}/etc/syslog-ng.conf.sample ]; then \
${INSTALL_DATA} ${FILESDIR}/syslog-ng.conf.sample ${PREFIX}/etc; \
fi
@if [ ! -f ${PREFIX}/etc/syslog-ng.conf ]; then \
${CP} ${PREFIX}/etc/syslog-ng.conf.sample ${PREFIX}/etc/syslog-ng.conf; \
fi
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View file

@ -0,0 +1,11 @@
--- scl/Makefile.in.orig 2011-01-15 08:15:10.000000000 -0800
+++ scl/Makefile.in 2011-01-20 21:16:20.000000000 -0800
@@ -200,7 +200,7 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SCL_SUBDIRS = system pacct syslogconf
-SCL_CONFIGS = scl.conf modules.conf syslog-ng.conf
+SCL_CONFIGS = scl.conf modules.conf syslog-ng.conf.dist
EXTRA_DIST = $(SCL_CONFIGS) $(SCL_SUBDIRS)
scldir = $(datadir)/include/scl
all: all-am

View file

@ -1,7 +1,9 @@
@unexec %D/etc/rc.d/syslog-ng.sh stop > /dev/null 2>&1 || true
etc/modules.conf
etc/scl.conf
@exec test -f %D/etc/syslog-ng.conf || cp -p %D/etc/syslog-ng.conf.sample %D/etc/syslog-ng.conf
@unexec if cmp -s %D/etc/syslog-ng.conf %D/etc/syslog-ng.conf.sample; then rm -f %D/etc/syslog-ng.conf; fi
etc/syslog-ng.conf.dist
etc/syslog-ng.conf.sample
bin/update-patterndb
bin/loggen