2000-04-25 14:48:06 +02:00
|
|
|
# New ports collection makefile for: syslog-ng
|
2012-06-19 07:12:27 +02:00
|
|
|
# Date created: 10 November 2006
|
2011-10-02 06:05:51 +02:00
|
|
|
# Whom: Ivan Lago <ivan.lago@ifom-ieo-campus.it>
|
2000-04-25 14:48:06 +02:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= syslog-ng
|
2012-08-31 19:35:11 +02:00
|
|
|
PORTVERSION= 3.3.6
|
2012-09-11 16:05:31 +02:00
|
|
|
PORTREVISION= 3
|
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
|
|
|
|
2011-10-02 06:05:51 +02:00
|
|
|
OPTIONS= SYS_SSL "Build with OpenSSL support (from system)" off \
|
2012-05-23 21:17:31 +02:00
|
|
|
PORTS_SSL "Build with OpenSSL support (from ports)" on \
|
2011-10-02 06:05:51 +02:00
|
|
|
TCP_WRAPPERS "Build with TCP Wrappers" off \
|
|
|
|
SQL "Build with database (libdbi) support" off \
|
2012-09-01 05:01:35 +02:00
|
|
|
SPOOF "Build with spoof source support" off \
|
2011-10-02 06:05:51 +02:00
|
|
|
IPV6 "Build with IPV6 support" on \
|
2011-10-12 21:51:03 +02:00
|
|
|
PCRE "Build with PCRE support" on \
|
|
|
|
JSON_C "Build with JSON-C support" off \
|
|
|
|
JSON_GLIB "Build with JSON-GLIB support" off \
|
2012-09-04 20:27:59 +02:00
|
|
|
SYSLOG2NG "Install syslog2ng script" off
|
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
|
|
|
|
|
|
|
.if defined(WITH_SYS_SSL) && defined(WITH_PORTS_SSL)
|
|
|
|
BROKEN= SYS_SSL and PORTS_SSL are mutually exclusive
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_SYS_SSL) || defined(WITH_PORTS_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
|
|
|
|
|
|
|
|
.if defined(WITH_PORTS_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
|
|
|
|
2003-03-06 16:00:05 +01:00
|
|
|
.if defined(WITH_TCP_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
|
|
|
|
|
2011-10-02 06:05:51 +02:00
|
|
|
.if defined(WITH_SPOOF)
|
|
|
|
BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet-devel
|
2012-04-18 21:12:15 +02:00
|
|
|
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet116-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
|
|
|
|
|
|
|
|
.if defined(WITH_IPV6)
|
|
|
|
CONFIGURE_ARGS+= --enable-ipv6
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-ipv6
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_PCRE)
|
|
|
|
CONFIGURE_ARGS+= --enable-pcre
|
2012-02-14 13:45:35 +01:00
|
|
|
LIB_DEPENDS+= pcre.1:${PORTSDIR}/devel/pcre
|
2011-10-02 06:05:51 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-pcre
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_SQL)
|
|
|
|
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
|
|
|
|
|
2011-10-12 21:51:03 +02:00
|
|
|
.if defined(WITH_JSON_C) && defined(WITH_JSON_GLIB)
|
|
|
|
BROKEN= JSON_C and JSON_GLIB are mutually exclusive
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_JSON_GLIB)
|
|
|
|
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
|
|
|
|
.elif defined(WITH_JSON_C)
|
|
|
|
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
|
|
|
|
|
2012-09-04 20:27:59 +02:00
|
|
|
.if defined(WITH_SYSLOG2NG)
|
|
|
|
PLIST_FILES+= sbin/syslog2ng
|
|
|
|
.endif
|
|
|
|
|
2008-03-09 14:25:37 +01:00
|
|
|
post-patch:
|
2012-04-18 21:12:15 +02:00
|
|
|
@${REINPLACE_CMD} -e 's:libnet-config:libnet116-config:g' ${WRKSRC}/configure
|
2011-10-02 06:05:51 +02:00
|
|
|
@${LN} ${WRKSRC}/scl/syslog-ng.conf ${WRKSRC}/scl/syslog-ng.conf.dist
|
2008-03-09 14:25:37 +01:00
|
|
|
|
2000-04-25 14:48:06 +02:00
|
|
|
post-install:
|
2012-09-04 20:27:59 +02:00
|
|
|
.if defined(WITH_SYSLOG2NG)
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/contrib/syslog2ng ${PREFIX}/sbin
|
|
|
|
.endif
|
2000-04-25 14:48:06 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${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>
|