X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=syslog-ng.spec;h=599e7e6b3b6a08c3d319643fc6bfca5179985bae;hb=6ab9000ccb6572a140361fb0db7f2ed6e1fdfdd5;hp=a033f3b08539ca78e61f19850d7fb03fc9fb24f0;hpb=2e0b8202e0ad7fcd65443f66d22926531145881c;p=packages%2Fsyslog-ng.git diff --git a/syslog-ng.spec b/syslog-ng.spec index a033f3b..599e7e6 100644 --- a/syslog-ng.spec +++ b/syslog-ng.spec @@ -1,37 +1,49 @@ -%define mainver 1.6 -%define minorver 0 -%define subver rc4 -%define fullver %{mainver}.%{minorver}%{subver} +# +# Conditional build: +%bcond_with dynamic # link dynamically with glib and eventlog +# +%define mainver 2.0 +%define minver 2 Summary: Syslog-ng - new generation of the system logger -Summary(pl): Syslog-ng - zamiennik syskloga -Summary(pt_BR): Daemon de log nova geração +Summary(pl.UTF-8): Syslog-ng - zamiennik syskloga +Summary(pt_BR.UTF-8): Daemon de log nova geração Name: syslog-ng -Version: %{mainver}.%{minorver} -Release: 0.%{subver}.1 -License: GPL +Version: %{mainver}.%{minver} +Release: 1 +License: GPL v2 Group: Daemons -Source0: http://www.balabit.hu/downloads/syslog-ng/%{mainver}/src/%{name}-%{fullver}.tar.gz -# Source0-md5: 13f094a0073f45c3f6e390c14fc4cc71 +Source0: http://www.balabit.com/downloads/syslog-ng/%{mainver}/src/%{name}-%{version}.tar.gz +# Source0-md5: 7ef12e1e43a99c5b6b8d1984dde72151 Source1: %{name}.init Source2: %{name}.conf Source3: %{name}.logrotate -Patch0: %{name}-ac25x.patch -URL: http://www.balabit.hu/products/syslog-ng/ -BuildRequires: autoconf +Patch0: %{name}-link.patch +URL: http://www.balabit.com/products/syslog_ng/ +BuildRequires: autoconf >= 2.53 BuildRequires: automake +BuildRequires: bison BuildRequires: flex -BuildRequires: libol-static >= 0.3.10 BuildRequires: libwrap-devel -PreReq: rc-scripts >= 0.2.0 -Requires(post,preun): /sbin/chkconfig +BuildRequires: pkgconfig +BuildRequires: rpmbuild(macros) >= 1.268 +%if %{with dynamic} +BuildRequires: eventlog-devel >= 0.2 +BuildRequires: glib2-devel >= 1:2.0.0 +%else +BuildRequires: eventlog-static >= 0.2 +BuildRequires: glib2-static >= 1:2.0.0 +BuildRequires: glibc-static +%endif 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 +Obsoletes: msyslog +Obsoletes: syslog BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -45,34 +57,39 @@ 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 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 pl.UTF-8 +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 +%description -l pt_BR.UTF-8 +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 +por seu conteúdo (usando expressões regulares) e não apenas pelo par facility/prioridade como o syslog original. %prep -%setup -q -n %{name}-%{fullver} +%setup -q %patch0 -p1 +%{__tar} xzf doc/reference/syslog-ng.html.tar.gz + %build -rm -f missing %{__aclocal} %{__autoconf} %{__automake} %configure \ - --enable-tcp-wrapper + --sysconfdir=%{_sysconfdir}/syslog-ng \ +%if %{with dynamic} + --enable-dynamic-linking +%endif + %{__make} %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/{mail,archiv/mail} +install -d $RPM_BUILD_ROOT{/etc/{sysconfig,logrotate.d,rc.d/init.d},%{_sysconfdir}/syslog-ng} \ + $RPM_BUILD_ROOT/var/log %{__make} install \ DESTDIR=$RPM_BUILD_ROOT @@ -81,13 +98,17 @@ 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 -> $RPM_BUILD_ROOT/var/log/syslog +for n in daemon debug iptables kernel lpr maillog messages secure spooler syslog user xferlog +do + > $RPM_BUILD_ROOT/var/log/$n +done +touch $RPM_BUILD_ROOT/etc/sysconfig/%{name} %clean rm -rf $RPM_BUILD_ROOT %post -for n in /var/log/{cron,daemon,debug,kernel,lpr,maillog,messages,ppp,secure,spooler,syslog,user,mail/{info,warn,err}} +for n in /var/log/{daemon,debug,iptables,kernel,lpr,maillog,messages,secure,spooler,syslog,user,xferlog} do [ -f $n ] && continue touch $n @@ -95,31 +116,24 @@ do done /sbin/chkconfig --add syslog-ng -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 +%service syslog-ng restart "syslog-ng daemon" %preun if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/syslog-ng ]; then - /etc/rc.d/init.d/syslog-ng stop >&2 - fi + %service syslog-ng stop /sbin/chkconfig --del syslog-ng fi %files %defattr(644,root,root,755) -%doc doc/syslog-ng.conf.{demo,sample} 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/* +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} %attr(750,root,root) %dir %{_sysconfdir}/syslog-ng -%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/syslog-ng/syslog-ng.conf -%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/syslog-ng +%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 %{_mandir}/man[58]/* -%attr(640,root,root) %ghost /var/log/syslog -%dir /var/log/mail -%dir /var/log/archiv -%dir /var/log/archiv/mail +%attr(640,root,root) %ghost /var/log/*