2013-08-14 15:37:28 +00:00
|
|
|
# Created by: Ivan Lago <ivan.lago@ifom-ieo-campus.it>
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2014-03-26 01:37:43 +00:00
|
|
|
PORTNAME= syslog-ng
|
2014-06-06 19:36:43 +00:00
|
|
|
PORTVERSION= 3.4.8
|
2015-03-23 19:20:15 +00:00
|
|
|
PORTREVISION= 9
|
2013-08-14 15:37:28 +00:00
|
|
|
CATEGORIES= sysutils
|
|
|
|
DISTVERSION= $(PORTVERSION:S/a/alpha/:S/b/beta/:S/r/rc/)
|
2014-03-26 01:37:43 +00:00
|
|
|
PKGNAMESUFFIX= 34
|
2013-08-14 15:37:28 +00:00
|
|
|
DISTFILES= syslog-ng_${DISTVERSION}.tar.gz
|
|
|
|
MASTER_SITES= http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/${DISTVERSION}/source/
|
|
|
|
|
|
|
|
MAINTAINER= cy@FreeBSD.org
|
2014-07-05 14:45:09 +00:00
|
|
|
COMMENT= Powerful syslogd replacement
|
|
|
|
|
|
|
|
LIB_DEPENDS= libevtlog.so:${PORTSDIR}/sysutils/eventlog
|
2013-08-14 15:37:28 +00:00
|
|
|
|
|
|
|
CONFLICTS?= syslog-ng-[0-9]* syslog-ng[0-9]-[0-9]* \
|
|
|
|
syslog-ng[0-9][0-9]-[0-9]* \
|
|
|
|
syslog-ng-devel-[0-9]*
|
|
|
|
WRKSRC= $(WRKDIR)/$(PORTNAME)-$(DISTVERSION)
|
|
|
|
|
2015-01-15 09:05:37 +00:00
|
|
|
OPTIONS_DEFINE= TCP_WRAPPERS SQL SPOOF IPV6 PCRE SMTP JSON GEOIP DOCS OPENSSL
|
|
|
|
OPTIONS_DEFAULT= OPENSSL PCRE
|
2013-08-14 15:37:28 +00:00
|
|
|
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
|
|
|
|
SMTP_DESC= Build with SMTP support
|
|
|
|
JSON_DESC= Build with JSON-C support
|
|
|
|
GEOIP_DESC= Build with GeoIP support
|
|
|
|
|
2014-07-05 14:45:09 +00:00
|
|
|
USES= gmake libtool pathfix pkgconfig
|
2013-08-14 15:37:28 +00:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
USE_RC_SUBR= syslog-ng
|
|
|
|
GNU_CONFIGURE= yes
|
2014-03-04 20:52:09 +00:00
|
|
|
USE_GNOME= glib20
|
2013-08-14 15:37:28 +00:00
|
|
|
SUB_FILES= pkg-message
|
|
|
|
|
|
|
|
CONFIGURE_ARGS= --sysconfdir=${LOCALBASE}/etc --localstatedir=/var/db \
|
|
|
|
--enable-dynamic-linking \
|
|
|
|
--enable-debug
|
|
|
|
|
2014-07-05 14:45:09 +00:00
|
|
|
BROKEN_sparc64= Does not compile on sparc64: gcc core dump
|
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2015-01-15 09:05:37 +00:00
|
|
|
.if ${PORT_OPTIONS:MOPENSSL}
|
2013-08-14 15:37:28 +00:00
|
|
|
USE_OPENSSL= yes
|
2015-01-15 09:05:37 +00:00
|
|
|
WITH_OPENSSL_PORT= yes
|
2013-08-14 15:37:28 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-ssl
|
|
|
|
CONFIGURE_ENV+= OPENSSL_CFLAGS="${OPENSSL_CFLAGS}" \
|
|
|
|
OPENSSL_LIBS="${OPENSSL_LDFLAGS} -lcrypto -lssl"
|
2014-07-05 14:45:09 +00:00
|
|
|
PLIST_FILES+= lib/syslog-ng/libafsocket-tls.so
|
2013-08-14 15:37:28 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-ssl
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MTCP_WRAPPERS}
|
|
|
|
CONFIGURE_ARGS+= --enable-tcp-wrapper
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-tcp-wrapper
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSPOOF}
|
2014-07-14 15:38:39 +00:00
|
|
|
LIB_DEPENDS+= libnet.so:${PORTSDIR}/net/libnet
|
2013-08-14 15:37:28 +00:00
|
|
|
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config
|
|
|
|
CONFIGURE_ARGS+= --enable-spoof-source --with-libnet=${LOCALBASE}/bin
|
|
|
|
CFLAGS+= `${LIBNET_CONFIG} --cflags` -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= `${LIBNET_CONFIG} --libs`
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-spoof-source
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MIPV6}
|
|
|
|
CONFIGURE_ARGS+= --enable-ipv6
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-ipv6
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MPCRE}
|
|
|
|
CONFIGURE_ARGS+= --enable-pcre
|
2014-03-04 20:52:09 +00:00
|
|
|
LIB_DEPENDS+= libpcre.so:${PORTSDIR}/devel/pcre
|
2013-08-14 15:37:28 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-pcre
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MGEOIP}
|
|
|
|
CONFIGURE_ARGS+= --enable-geoip
|
2014-03-04 20:52:09 +00:00
|
|
|
LIB_DEPENDS+= libGeoIP.so:${PORTSDIR}/net/GeoIP
|
2013-08-14 15:37:28 +00:00
|
|
|
CONFIGURE_ENV+= GEOIP_LIBS="-lGeoIP"
|
2014-07-05 14:45:09 +00:00
|
|
|
PLIST_FILES+= lib/syslog-ng/libtfgeoip.so
|
2013-08-14 15:37:28 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-geoip
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSMTP}
|
|
|
|
CONFIGURE_ARGS+= --with-libesmtp=/usr/local/
|
2014-03-04 20:52:09 +00:00
|
|
|
LIB_DEPENDS+= libesmtp.so:${PORTSDIR}/mail/libesmtp
|
2014-07-05 14:45:09 +00:00
|
|
|
PLIST_FILES+= lib/syslog-ng/libafsmtp.so
|
2013-08-14 15:37:28 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-smtp
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSQL}
|
2014-03-04 20:52:09 +00:00
|
|
|
LIB_DEPENDS+= libdbi.so:${PORTSDIR}/databases/libdbi
|
2014-08-26 01:54:11 +00:00
|
|
|
CONFIGURE_ENV+= LIBDBI_LIBS="-L${LOCALBASE}/lib -ldbi"
|
2013-08-14 15:37:28 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-sql
|
2014-07-05 14:45:09 +00:00
|
|
|
PLIST_FILES+= lib/syslog-ng/libafsql.so
|
2013-08-14 15:37:28 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-sql
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MJSON}
|
2014-10-31 00:14:16 +00:00
|
|
|
LIB_DEPENDS+= libjson-c.so:${PORTSDIR}/devel/json-c
|
2013-08-14 15:37:28 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-json
|
2014-07-05 14:45:09 +00:00
|
|
|
PLIST_FILES+= lib/syslog-ng/libjson-plugin.so
|
2013-08-14 15:37:28 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-json
|
|
|
|
.endif
|
|
|
|
|
2014-12-18 20:54:50 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2013-08-14 15:37:28 +00:00
|
|
|
.if ${OSVERSION} >= 900034
|
|
|
|
CONFIGURE_ARGS+= --disable-linux-caps
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's:libnet-config:libnet11-config:g' ${WRKSRC}/configure
|
2015-03-23 19:20:15 +00:00
|
|
|
@${LN} ${WRKSRC}/scl/syslog-ng.conf ${WRKSRC}/scl/syslog-ng.conf.sample
|
|
|
|
@${LN} ${WRKSRC}/scl/scl.conf ${WRKSRC}/scl/scl.conf.sample
|
2013-08-14 15:37:28 +00:00
|
|
|
|
|
|
|
post-install:
|
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2013-10-11 15:55:42 +00:00
|
|
|
${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/AUTHORS ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/COPYING ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/NEWS ${STAGEDIR}${DOCSDIR}
|
2013-08-14 15:37:28 +00:00
|
|
|
.endif
|
2013-10-11 15:55:42 +00:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/syslog-ng.conf.sample ${STAGEDIR}${PREFIX}/etc
|
2015-03-23 19:20:15 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/scl/syslog-ng.conf.sample ${STAGEDIR}${PREFIX}/etc
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/scl/scl.conf.sample ${STAGEDIR}${PREFIX}/etc
|
2013-08-14 15:37:28 +00:00
|
|
|
|
2014-12-18 20:54:50 +00:00
|
|
|
.include <bsd.port.post.mk>
|