-Summary: Syslog-ng - new generation fo the system logger
-Summary(pl): Syslog-ng - zamiennik sysklog'a
+%define mainver 1.9
+%define minorver 9
+
+Summary: Syslog-ng - new generation of the system logger
+Summary(pl): Syslog-ng - zamiennik syskloga
+Summary(pt_BR): Daemon de log nova geração
Name: syslog-ng
-Version: 1.4.3
-Release: 1
+Version: %{mainver}.%{minorver}
+Release: 1
License: GPL
Group: Daemons
-Group(pl): Demony
-Source0: http://www.balabit.hu//downloads/syslog-ng/source/%{name}-%{version}.tar.gz
-Source1: syslog-ng.init
-Source2: syslog-ng.conf
-Patch0: syslog-ng-autoconf.patch
-BuildRequires: libol-static >= 0.2.16
+Source0: http://www.balabit.com/downloads/syslog-ng/%{mainver}/src/%{name}-%{version}.tar.gz
+# Source0-md5: 76dfb7ea910d1b033031aca2f40bf723
+Source1: %{name}.init
+Source2: %{name}.conf
+Source3: %{name}.logrotate
+Patch0: %{name}-link.patch
+URL: http://www.balabit.com/products/syslog_ng/
+BuildRequires: autoconf >= 2.53
+BuildRequires: automake
+BuildRequires: eventlog-devel
BuildRequires: flex
+BuildRequires: glib2-static
+BuildRequires: libwrap-devel
+Requires(post): fileutils
+Requires(post,preun): /sbin/chkconfig
+Requires: logrotate
+Requires: psmisc >= 20.1
Requires: rc-scripts >= 0.2.0
+Provides: syslogdaemon
Obsoletes: syslog
+Obsoletes: msyslog
+Obsoletes: klogd
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _sysconfdir /etc
-
%description
-syslog-ng is a syslogd replacement for unix and unix-like systems. It has
-been tested on Solaris, BSDi and Linux, and were found to run reliably.
-syslog-ng gives you a much enhanced configuration scheme, which lets you
-filter messages based on not only priority/facility pairs, but also on
-message content. You can use regexps to direct log stream to different
-destinations. A destination can be anything from a simple file to a
-network connection. syslog-ng supports TCP logforwarding, together with
-hashing to prevent unauthorized modification on the line.
+syslog-ng is a syslogd replacement for unix and unix-like systems. It
+has been tested on Solaris, BSDi and Linux, and were found to run
+reliably. syslog-ng gives you a much enhanced configuration scheme,
+which lets you filter messages based on not only priority/facility
+pairs, but also on message content. You can use regexps to direct log
+stream to different destinations. A destination can be anything from a
+simple file to a network connection. syslog-ng supports TCP
+logforwarding, together with hashing to prevent unauthorized
+modification on the line.
%description -l pl
-Syslog-ng jest zamiennikiem dla standartowo u¿ywanych programów typu sysklog
-Dzia³a w systemie SunON, BSD, Linux. Daje znacznie wiêksze mo¿liwosci
-logowanie i kontrolowanie zbieranych informacji.
+Syslog-ng jest zamiennikiem dla standardowo u¿ywanych programów typu
+sysklog. Dzia³a w systemie SunOS, BSD, Linux. Daje znacznie wiêksze
+mo¿liwo¶ci logowania i kontrolowania zbieranych informacji.
+
+%description -l pt_BR
+Syslog-ng é um substituto para o syslog tradicional, mas com diversas
+melhorias, como, por exemplo, a habilidade de filtrar mensagens de log
+por seu conteúdo (usando expressões regulares) e não apenas pelo par
+facility/prioridade como o syslog original.
%prep
%setup -q
-%patch -p1
+%patch0 -p1
%build
-aclocal
-autoconf
-LDFLAGS="-s"; export LDFLAGS
-%configure
-make
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%configure \
+ --sysconfdir=%{_sysconfdir}/syslog-ng
+
+%{__make}
+
+tar zxvf doc/reference/syslog-ng.html.tar.gz
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d},%{_sysconfdir}/syslog-ng} \
+ $RPM_BUILD_ROOT/var/log/
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/syslog-ng} \
- $RPM_BUILD_ROOT/var/log/news
-
-make DESTDIR=$RPM_BUILD_ROOT install
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/syslog-ng
-gzip -9nf doc/syslog-ng.conf.{demo,sample} doc/sgml/syslog-ng.txt \
- $RPM_BUILD_ROOT%{_mandir}/man[58]/*
+for n in debug kernel maillog messages secure syslog user spooler lpr daemon
+do
+ > $RPM_BUILD_ROOT/var/log/$n
+done
-touch $RPM_BUILD_ROOT/var/log/syslog
+%clean
+rm -rf $RPM_BUILD_ROOT
%post
-for n in /var/log/{auth.log,syslog,cron.log,daemon.log,kern.log,lpr.log,user.log,uucp.log,ppp.log,mail.log,mail.info,mail.warn,mail.err,debug,messages}
+for n in /var/log/{cron,daemon,debug,kernel,lpr,maillog,messages,ppp,secure,spooler,syslog,user}
do
[ -f $n ] && continue
touch $n
done
/sbin/chkconfig --add syslog-ng
-if [ -f /var/lock/subsys/ ]; then
- /etc/rc.d/init.d/syslog restart &>/dev/null
+if [ -f /var/lock/subsys/syslog-ng ]; then
+ /etc/rc.d/init.d/syslog-ng restart >&2
else
echo "Run \"/etc/rc.d/init.d/syslog-ng start\" to start syslog-ng daemon."
fi
%preun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/ ]; then
+ if [ -f /var/lock/subsys/syslog-ng ]; then
/etc/rc.d/init.d/syslog-ng stop >&2
fi
/sbin/chkconfig --del syslog-ng
fi
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
%defattr(644,root,root,755)
-%doc doc/*.gz doc/sgml/syslog-ng.txt*
+%doc doc/examples/syslog-ng.conf.sample doc/reference/syslog-ng.txt* contrib/syslog-ng.conf.{doc,RedHat}
+%doc syslog-ng.html/*
%attr(750,root,root) %dir %{_sysconfdir}/syslog-ng
-%attr(640,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/syslog-ng/syslog-ng.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/syslog-ng/syslog-ng.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/syslog-ng
%attr(754,root,root) /etc/rc.d/init.d/syslog-ng
-%attr(755,root,root) %{_sbindir}/syslog-ng/
-
+%attr(755,root,root) %{_sbindir}/syslog-ng
%{_mandir}/man[58]/*
-%attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /var/log/*
+
+%attr(640,root,root) %ghost /var/log/*