2013-04-28 22:01:07 +02:00
|
|
|
# Created by: Ivan Lago <ivan.lago@ifom-ieo-campus.it>
|
2000-04-25 14:48:06 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= syslog-ng
|
2013-04-17 00:37:24 +02:00
|
|
|
PORTVERSION= 3.3.9
|
2000-04-25 14:48:06 +02:00
|
|
|
CATEGORIES= sysutils
|
2011-10-02 06:05:51 +02:00
|
|
|
MASTER_SITES= http://www.balabit.com/downloads/files/syslog-ng/sources/$(PORTVERSION)/source/
|
|
|
|
DISTFILES= $(PORTNAME)_$(PORTVERSION).tar.gz
|
2000-04-25 14:48:06 +02:00
|
|
|
|
2011-10-02 06:05:51 +02:00
|
|
|
MAINTAINER= cy@FreeBSD.org
|
2006-02-19 19:35:00 +01:00
|
|
|
COMMENT= A powerful syslogd replacement
|
2000-04-25 14:48:06 +02:00
|
|
|
|
2011-10-12 21:51:03 +02:00
|
|
|
CONFLICTS?= syslog-ng-[0-9]* syslog-ng[0-9]-[0-9]* \
|
|
|
|
syslog-ng-devel-[0-9]*
|
|
|
|
WRKSRC= $(WRKDIR)/$(PORTNAME)-$(PORTVERSION)
|
2011-09-26 11:24:20 +02:00
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
OPTIONS_RADIO= SSL JSON
|
|
|
|
OPTIONS_RADIO_SSL= SYS_SSL PORTS_SSL
|
|
|
|
OPTIONS_RADIO_JSON= JSON_C JSON_GLIB
|
|
|
|
OPTIONS_DEFINE= TCP_WRAPPERS SQL SPOOF IPV6 PCRE SYSLOG2NG DOCS
|
|
|
|
OPTIONS_DEFAULT= PORTS_SSL PCRE
|
|
|
|
SYS_SSL_DESC= Build with OpenSSL support (from system)
|
|
|
|
PORTS_SSL_DESC= Build with OpenSSL support (from ports)
|
|
|
|
TCP_WRAPPERS_DESC= Build with TCP Wrappers
|
|
|
|
SQL_DESC= Build with database (libdbi) support
|
|
|
|
SPOOF_DESC= Build with spoof source support
|
|
|
|
IPV6_DESC= Build with IPV6 support
|
|
|
|
PCRE_DESC= Build with PCRE support
|
|
|
|
JSON_C_DESC= Build with JSON-C support
|
|
|
|
JSON_GLIB_DESC= Build with JSON-GLIB support
|
|
|
|
SYSLOG2NG_DESC= Install syslog2ng script
|
2000-04-25 14:48:06 +02:00
|
|
|
|
2011-10-02 06:05:51 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2007-02-05 15:48:57 +01:00
|
|
|
|
2011-10-02 06:05:51 +02:00
|
|
|
LIB_DEPENDS= evtlog.0:${PORTSDIR}/sysutils/eventlog
|
2007-05-30 08:42:40 +02:00
|
|
|
|
2011-10-02 06:05:51 +02:00
|
|
|
MAN1= loggen.1 pdbtool.1 syslog-ng-ctl.1
|
2007-02-05 15:48:57 +01:00
|
|
|
MAN5= syslog-ng.conf.5
|
|
|
|
MAN8= syslog-ng.8
|
|
|
|
|
2012-06-19 07:12:27 +02:00
|
|
|
USE_LDCONFIG= yes
|
2012-08-06 01:19:36 +02:00
|
|
|
USE_RC_SUBR= syslog-ng
|
2011-10-02 06:05:51 +02:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
USE_GMAKE= yes
|
2011-10-12 21:51:03 +02:00
|
|
|
USE_GNOME= glib20 gnomehack
|
2011-10-02 06:05:51 +02:00
|
|
|
SUB_FILES= pkg-message
|
|
|
|
|
|
|
|
CONFIGURE_ARGS= --sysconfdir=${LOCALBASE}/etc --localstatedir=/var/db \
|
2012-06-19 07:12:27 +02:00
|
|
|
--enable-dynamic-linking
|
2011-10-02 06:05:51 +02:00
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MSYS_SSL} || ${PORT_OPTIONS:MPORTS_SSL}
|
2012-06-19 07:12:27 +02:00
|
|
|
USE_OPENSSL= yes
|
|
|
|
CONFIGURE_ARGS+= --enable-ssl
|
|
|
|
CONFIGURE_ENV+= OPENSSL_CFLAGS="${OPENSSL_CFLAGS}" \
|
|
|
|
OPENSSL_LIBS="${OPENSSL_LDFLAGS} -lcrypto -lssl"
|
|
|
|
PLIST_FILES+= lib/syslog-ng/libafsocket-tls.la lib/syslog-ng/libafsocket-tls.so
|
2011-10-02 06:05:51 +02:00
|
|
|
.else
|
2012-06-19 07:12:27 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-ssl
|
2011-10-02 06:05:51 +02:00
|
|
|
.endif
|
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MPORTS_SSL}
|
2012-06-19 07:12:27 +02:00
|
|
|
WITH_OPENSSL_PORT= yes
|
2011-10-02 06:05:51 +02:00
|
|
|
.endif
|
|
|
|
|
2007-02-05 15:48:57 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
2000-04-25 14:48:06 +02:00
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MTCP_WRAPPERS}
|
2007-02-05 15:48:57 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-tcp-wrapper
|
2011-10-02 06:05:51 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-tcp-wrapper
|
2003-03-06 16:00:05 +01:00
|
|
|
.endif
|
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MSPOOF}
|
2013-02-18 22:36:06 +01:00
|
|
|
LIB_DEPENDS+= net:${PORTSDIR}/net/libnet
|
|
|
|
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config
|
2012-06-19 07:12:27 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-spoof-source --with-libnet=${LOCALBASE}/bin
|
2012-09-04 16:31:48 +02:00
|
|
|
CFLAGS+= -g `${LIBNET_CONFIG} --cflags` -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -g `${LIBNET_CONFIG} --libs`
|
2011-10-02 06:05:51 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-spoof-source
|
|
|
|
.endif
|
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MIPV6}
|
2011-10-02 06:05:51 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-ipv6
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-ipv6
|
|
|
|
.endif
|
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MPCRE}
|
2011-10-02 06:05:51 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-pcre
|
2013-01-18 22:10:57 +01:00
|
|
|
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
|
2011-10-02 06:05:51 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-pcre
|
|
|
|
.endif
|
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MSQL}
|
2011-10-02 06:05:51 +02:00
|
|
|
LIB_DEPENDS+= dbi.1:${PORTSDIR}/databases/libdbi
|
|
|
|
CONFIGURE_ENV+= LIBDBI_LIBS="-ldbi"
|
|
|
|
CONFIGURE_ARGS+= --enable-sql
|
|
|
|
PLIST_FILES+= lib/syslog-ng/libafsql.la lib/syslog-ng/libafsql.so
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-sql
|
|
|
|
.endif
|
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MJSON_GLIB}
|
2011-10-12 21:51:03 +02:00
|
|
|
LIB_DEPENDS+= json-glib-1.0.0:${PORTSDIR}/devel/json-glib
|
2012-06-19 07:12:27 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-json --with-json=json-glib
|
2011-10-12 21:51:03 +02:00
|
|
|
PLIST_FILES+= lib/syslog-ng/libtfjson.la lib/syslog-ng/libtfjson.so
|
2013-04-28 22:01:07 +02:00
|
|
|
.elif ${PORT_OPTIONS:MJSON_C}
|
2011-10-12 21:51:03 +02:00
|
|
|
LIB_DEPENDS+= json.0:${PORTSDIR}/devel/json-c
|
2012-06-19 07:12:27 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-json --with-json=json-c
|
2011-10-12 21:51:03 +02:00
|
|
|
PLIST_FILES+= lib/syslog-ng/libtfjson.la lib/syslog-ng/libtfjson.so
|
|
|
|
.else
|
2012-06-19 07:12:27 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-json
|
2011-10-12 21:51:03 +02:00
|
|
|
.endif
|
|
|
|
|
2011-10-02 06:05:51 +02:00
|
|
|
.if ${OSVERSION} >= 900034
|
|
|
|
CONFIGURE_ARGS+= --disable-linux-caps
|
2008-03-09 14:25:37 +01:00
|
|
|
.endif
|
|
|
|
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MSYSLOG2NG}
|
2012-09-04 20:27:59 +02:00
|
|
|
PLIST_FILES+= sbin/syslog2ng
|
|
|
|
.endif
|
|
|
|
|
2008-03-09 14:25:37 +01:00
|
|
|
post-patch:
|
2013-02-18 22:36:06 +01:00
|
|
|
@${REINPLACE_CMD} -e 's:libnet-config:libnet11-config:g' ${WRKSRC}/configure
|
2011-10-02 06:05:51 +02:00
|
|
|
@${LN} ${WRKSRC}/scl/syslog-ng.conf ${WRKSRC}/scl/syslog-ng.conf.dist
|
2012-11-11 22:21:08 +01:00
|
|
|
@${FIND} ${WRKSRC} -name "*.orig" -delete
|
2008-03-09 14:25:37 +01:00
|
|
|
|
2000-04-25 14:48:06 +02:00
|
|
|
post-install:
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MSYSLOG2NG}
|
2012-09-04 20:27:59 +02:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/contrib/syslog2ng ${PREFIX}/sbin
|
|
|
|
.endif
|
2013-04-28 22:01:07 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2000-04-25 14:48:06 +02:00
|
|
|
${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} \
|
2012-06-19 07:12:27 +02:00
|
|
|
${PREFIX}/share/doc/syslog-ng
|
2011-10-02 06:05:51 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/AUTHORS ${PREFIX}/share/doc/syslog-ng
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/COPYING ${PREFIX}/share/doc/syslog-ng
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/ChangeLog ${PREFIX}/share/doc/syslog-ng
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/NEWS ${PREFIX}/share/doc/syslog-ng
|
2000-04-25 14:48:06 +02:00
|
|
|
.endif
|
2011-10-02 06:05:51 +02:00
|
|
|
@if [ ! -f ${PREFIX}/etc/syslog-ng.conf.sample ]; then \
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/syslog-ng.conf.sample ${PREFIX}/etc; \
|
|
|
|
fi
|
2011-10-12 21:51:03 +02:00
|
|
|
@if [ ! -f ${PREFIX}/etc/syslog-ng.conf.dist ]; then \
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/scl/syslog-ng.conf.dist ${PREFIX}/etc; \
|
2011-10-02 06:05:51 +02:00
|
|
|
fi
|
2000-04-25 14:48:06 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
2007-02-05 15:48:57 +01:00
|
|
|
.include <bsd.port.post.mk>
|