# (well, for modules bringing additional functionality it's acceptable IMO --q)
#
# Conditional build:
-%bcond_with dynamic # link dynamically with glib, eventlog, pcre (modules are always linked dynamically)
-%bcond_without sql # build without support for logging to SQL DB
-%bcond_without tests # do not perform "make check"
-%bcond_without json # build without support for JSON template formatting
-%bcond_without mongodb # build without support for mongodb destination
-%bcond_without smtp # build without support for logging into SMTP
+%bcond_with dynamic # link dynamically with glib, eventlog, pcre (modules are always linked dynamically)
+%bcond_without sql # support for logging to SQL DB
+%bcond_without tests # do not perform "make check"
+%bcond_without json # support for JSON template formatting
+%bcond_without mongodb # support for mongodb destination
+%bcond_without redis # support for Redis destination
+%bcond_without smtp # support for logging into SMTP
+%bcond_without geoip # support for GeoIP
%bcond_without system_libivykis # use system libivykis
-%bcond_with system_rabbitmq # use system librabbitmq [not supported yet]
+%bcond_with system_rabbitmq # use system librabbitmq [not supported yet]
%define glib2_ver 1:2.24.0
Summary: Syslog-ng - new generation of the system logger
Summary(pl.UTF-8): Syslog-ng - systemowy demon logujący nowej generacji
Summary(pt_BR.UTF-8): Daemon de log nova geração
Name: syslog-ng
-Version: 3.4.7
+Version: 3.5.3
Release: 1
License: GPL v2+ with OpenSSL exception
Group: Daemons
Source0: http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/%{version}/source/%{name}_%{version}.tar.gz
-# Source0-md5: eed6df3a8728bbc4c607c3b44aeaa405
+# Source0-md5: 4cc29efa55fc41e65c48ece9bc88f88b
Source1: %{name}.init
Source2: %{name}.conf
Source3: %{name}.logrotate
-Source4: http://www.balabit.com/support/documentation/syslog-ng-ose-3.4-guides/en/syslog-ng-ose-v3.4-guide-admin/pdf/%{name}-ose-v3.4-guide-admin.pdf
-# Source4-md5: dad7f9ed093d70ea1ff05a625fc9e7f9
+Source4: http://www.balabit.com/support/documentation/syslog-ng-ose-3.5-guides/en/syslog-ng-ose-v3.5-guide-admin/pdf/%{name}-ose-v3.5-guide-admin.pdf
+# Source4-md5: b5e66123e37f670ff85fc2d74d263b01
Source5: %{name}-simple.conf
Source6: %{name}.upstart
Patch0: %{name}-datadir.patch
Patch3: %{name}-systemd.patch
Patch4: man-paths.patch
URL: http://www.balabit.com/products/syslog_ng/
-BuildRequires: GeoIP-devel >= 1.5.1
+%{?with_geoip:BuildRequires: GeoIP-devel >= 1.5.1}
BuildRequires: autoconf >= 2.53
BuildRequires: automake
BuildRequires: bison >= 2.4
%{?with_tests:BuildRequires: findutils}
BuildRequires: flex
BuildRequires: glib2-devel >= %{glib2_ver}
-%{?with_json:BuildRequires: json-c-devel >= 0.7}
+%{?with_redis:BuildRequires: hiredis-devel}
+%{?with_json:BuildRequires: json-c-devel >= 0.9}
BuildRequires: libcap-devel
%{?with_sql:BuildRequires: libdbi-devel >= 0.8.3-2}
%{?with_smtp:BuildRequires: libesmtp-devel}
%description module-json-plugin -l pl.UTF-8
Moduł sysloga-ng do obsługi szablonów z formatowaniem JSON.
+%package module-redis
+Summary: Redis destination support module for syslog-ng
+Summary(pl.UTF-8): Moduł sysloga-ng do obsługi zapisu logów w bazie Redis
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description module-redis
+Redis destination support module for syslog-ng (via libhiredis).
+
+%description module-redis -l pl.UTF-8
+Moduł sysloga-ng do obsługi zapisu logów w bazie Redis (poprzez
+libhiredis).
+
%package module-tfgeoip
Summary: syslog-ng template function module to get GeoIP info from an IPv4 addresses
Summary(pl.UTF-8): Moduł funkcji szablonu sysloga-ng do pobierania informacji GeoIP z adresów IPv4
--enable-systemd \
--with-systemdsystemunitdir=%{systemdunitdir} \
--enable-amqp \
- --enable-geoip \
+ --enable-geoip%{!?with_geoip:=no} \
--enable-ipv6 \
--enable-json%{!?with_json:=no} \
--enable-linux-caps \
--enable-pacct \
--enable-pcre \
+ --enable-redis%{!?with_redis:=no} \
--enable-smtp%{!?with_smtp:=no} \
--enable-spoof-source \
--enable-ssl \
%defattr(644,root,root,755)
%doc AUTHORS NEWS debian/syslog-ng.conf* contrib/relogger.pl
%doc contrib/syslog-ng.conf.{doc,simple,RedHat}
-%doc contrib/{apparmor,selinux,syslog2ng} doc/syslog-ng-ose-v3.4-guide-admin.pdf
+%doc contrib/{apparmor,selinux,syslog2ng} doc/syslog-ng-ose-v3.5-guide-admin.pdf
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
%attr(750,root,root) %dir %{_sysconfdir}/syslog-ng
%attr(750,root,root) %dir %{_sysconfdir}/syslog-ng/patterndb.d
%attr(755,root,root) %{_libdir}/syslog-ng/libafsocket.so
%attr(755,root,root) %{_libdir}/syslog-ng/libafsocket-notls.so
%attr(755,root,root) %{_libdir}/syslog-ng/libafsocket-tls.so
+%attr(755,root,root) %{_libdir}/syslog-ng/libafstomp.so
%attr(755,root,root) %{_libdir}/syslog-ng/libafuser.so
%attr(755,root,root) %{_libdir}/syslog-ng/libbasicfuncs.so
%attr(755,root,root) %{_libdir}/syslog-ng/libconfgen.so
%attr(755,root,root) %{_libdir}/syslog-ng/libcryptofuncs.so
%attr(755,root,root) %{_libdir}/syslog-ng/libcsvparser.so
%attr(755,root,root) %{_libdir}/syslog-ng/libdbparser.so
+%attr(755,root,root) %{_libdir}/syslog-ng/liblinux-kmsg-format.so
%attr(755,root,root) %{_libdir}/syslog-ng/libpacctformat.so
%attr(755,root,root) %{_libdir}/syslog-ng/libsyslog-ng-crypto.so
%attr(755,root,root) %{_libdir}/syslog-ng/libsyslogformat.so
%dir %{_datadir}/syslog-ng/include/scl
%dir %{_datadir}/syslog-ng/include/scl/pacct
%{_datadir}/syslog-ng/include/scl/pacct/plugin.conf
+%dir %{_datadir}/syslog-ng/include/scl/rewrite
+%{_datadir}/syslog-ng/include/scl/rewrite/cc-mask.conf
%dir %{_datadir}/syslog-ng/include/scl/syslogconf
%{_datadir}/syslog-ng/include/scl/syslogconf/README
%attr(755,root,root) %{_datadir}/syslog-ng/include/scl/syslogconf/convert-syslogconf.awk
%attr(755,root,root) %{_libdir}/syslog-ng/libjson-plugin.so
%endif
+%if %{with redis}
+%files module-redis
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/syslog-ng/libredis.so
+%endif
+
+%if %{with geoip}
%files module-tfgeoip
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/syslog-ng/libtfgeoip.so
+%endif
%files libs
%defattr(644,root,root,755)