3 %bcond_with dynamic # link dynamically with glib and eventlog
8 Summary: Syslog-ng - new generation of the system logger
9 Summary(pl.UTF-8): Syslog-ng - zamiennik syskloga
10 Summary(pt_BR.UTF-8): Daemon de log nova geração
12 Version: %{mainver}.%{minver}
16 Source0: http://www.balabit.com/downloads/files/syslog-ng/sources/stable/src/%{name}-%{version}.tar.gz
17 # Source0-md5: 16fa7595834765537650b390e93fe5e7
20 Source3: %{name}.logrotate
21 Patch0: %{name}-link.patch
22 Patch1: %{name}-datadir.patch
23 URL: http://www.balabit.com/products/syslog_ng/
24 BuildRequires: autoconf >= 2.53
25 BuildRequires: automake
28 BuildRequires: pkgconfig
29 BuildRequires: rpmbuild(macros) >= 1.268
31 BuildRequires: eventlog-devel >= 0.2
32 BuildRequires: glib2-devel >= 1:2.2.0
33 BuildRequires: libnet-devel >= 1:1.1.2.1-3
34 BuildRequires: libwrap-devel
36 BuildRequires: eventlog-static >= 0.2
37 BuildRequires: glib2-static >= 1:2.2.0
38 BuildRequires: libnet-static >= 1:1.1.2.1-3
39 BuildRequires: libwrap-static
41 Requires(post): fileutils
42 Requires(post,preun): /sbin/chkconfig
44 Requires: psmisc >= 20.1
45 Requires: rc-scripts >= 0.2.0
46 Provides: syslogdaemon
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 syslog-ng is a syslogd replacement for unix and unix-like systems. It
54 has been tested on Solaris, BSDi and Linux, and were found to run
55 reliably. syslog-ng gives you a much enhanced configuration scheme,
56 which lets you filter messages based on not only priority/facility
57 pairs, but also on message content. You can use regexps to direct log
58 stream to different destinations. A destination can be anything from a
59 simple file to a network connection. syslog-ng supports TCP
60 logforwarding, together with hashing to prevent unauthorized
61 modification on the line.
63 %description -l pl.UTF-8
64 Syslog-ng jest zamiennikiem dla standardowo używanych programów typu
65 sysklog. Działa w systemie SunOS, BSD, Linux. Daje znacznie większe
66 możliwości logowania i kontrolowania zbieranych informacji.
68 %description -l pt_BR.UTF-8
69 Syslog-ng é um substituto para o syslog tradicional, mas com diversas
70 melhorias, como, por exemplo, a habilidade de filtrar mensagens de log
71 por seu conteúdo (usando expressões regulares) e não apenas pelo par
72 facility/prioridade como o syslog original.
79 %{__tar} xzf doc/reference/syslog-ng.html.tar.gz
86 --sysconfdir=%{_sysconfdir}/syslog-ng \
88 --enable-dynamic-linking
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,logrotate.d,rc.d/init.d},%{_sysconfdir}/syslog-ng} \
96 $RPM_BUILD_ROOT/var/{log,lib/%{name}}
99 DESTDIR=$RPM_BUILD_ROOT
101 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng
102 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf
103 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/syslog-ng
105 for n in daemon debug iptables kernel lpr maillog messages secure spooler syslog user xferlog
107 > $RPM_BUILD_ROOT/var/log/$n
109 touch $RPM_BUILD_ROOT/etc/sysconfig/%{name}
112 rm -rf $RPM_BUILD_ROOT
115 for n in /var/log/{daemon,debug,iptables,kernel,lpr,maillog,messages,secure,spooler,syslog,user,xferlog}
117 [ -f $n ] && continue
122 /sbin/chkconfig --add syslog-ng
123 %service syslog-ng restart "syslog-ng daemon"
126 if [ "$1" = "0" ]; then
127 %service syslog-ng stop
128 /sbin/chkconfig --del syslog-ng
132 %defattr(644,root,root,755)
133 %doc doc/examples/syslog-ng.conf.sample doc/reference/syslog-ng.txt* contrib/syslog-ng.conf.{doc,RedHat}
134 %doc syslog-ng.html/*
135 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
136 %attr(750,root,root) %dir %{_sysconfdir}/syslog-ng
137 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/syslog-ng/syslog-ng.conf
138 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/syslog-ng
139 %attr(754,root,root) /etc/rc.d/init.d/syslog-ng
140 %attr(755,root,root) %{_sbindir}/syslog-ng
141 %dir %{_var}/lib/%{name}
144 %attr(640,root,root) %ghost /var/log/*