]> git.pld-linux.org Git - packages/syslog-ng.git/blame - syslog-ng.spec
- keep syslong-ng.persist file in /var/lib/syslog-ng instead of /var
[packages/syslog-ng.git] / syslog-ng.spec
CommitLineData
5aa38709 1#
8eca2e89
JB
2# Conditional build:
3%bcond_with dynamic # link dynamically with glib and eventlog
4#
8b87d14c 5%define mainver 2.0
12362136 6%define minver 6
16f39b93 7
80a87a81 8Summary: Syslog-ng - new generation of the system logger
f7affeae
ER
9Summary(pl.UTF-8): Syslog-ng - zamiennik syskloga
10Summary(pt_BR.UTF-8): Daemon de log nova geração
db55bc6c 11Name: syslog-ng
40b3220e 12Version: %{mainver}.%{minver}
c2dd8b12 13Release: 1
2cb1bc96 14License: GPL v2
db55bc6c 15Group: Daemons
5493721d 16Source0: http://www.balabit.com/downloads/files/syslog-ng/sources/stable/src/%{name}-%{version}.tar.gz
12362136 17# Source0-md5: 16fa7595834765537650b390e93fe5e7
70c1937a 18Source1: %{name}.init
19Source2: %{name}.conf
e0f9b227 20Source3: %{name}.logrotate
489ceddf 21Patch0: %{name}-link.patch
34c905de 22URL: http://www.balabit.com/products/syslog_ng/
96ef1ac7 23BuildRequires: autoconf >= 2.53
53500332 24BuildRequires: automake
c807fdfe 25BuildRequires: bison
ac9ca8e0 26BuildRequires: flex
bf8c4b27 27BuildRequires: pkgconfig
da4f5bde 28BuildRequires: rpmbuild(macros) >= 1.268
8eca2e89 29%if %{with dynamic}
60232b55 30BuildRequires: eventlog-devel >= 0.2
422b3485
JB
31BuildRequires: glib2-devel >= 1:2.2.0
32BuildRequires: libnet-devel >= 1:1.1.2.1-3
33BuildRequires: libwrap-devel
8eca2e89 34%else
60232b55 35BuildRequires: eventlog-static >= 0.2
422b3485
JB
36BuildRequires: glib2-static >= 1:2.2.0
37BuildRequires: libnet-static >= 1:1.1.2.1-3
38BuildRequires: libwrap-static
8eca2e89 39%endif
768882cc 40Requires(post): fileutils
cc4597b5 41Requires(post,preun): /sbin/chkconfig
aa6d4755 42Requires: logrotate
0471c4e3 43Requires: psmisc >= 20.1
cc4597b5 44Requires: rc-scripts >= 0.2.0
18a2d4ea 45Provides: syslogdaemon
5db3c127 46Conflicts: klogd
1a409b7d 47Conflicts: msyslog
0baee825 48Conflicts: syslog
8a78073d 49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
db55bc6c 50
db55bc6c 51%description
70c1937a 52syslog-ng is a syslogd replacement for unix and unix-like systems. It
53has been tested on Solaris, BSDi and Linux, and were found to run
54reliably. syslog-ng gives you a much enhanced configuration scheme,
55which lets you filter messages based on not only priority/facility
56pairs, but also on message content. You can use regexps to direct log
57stream to different destinations. A destination can be anything from a
58simple file to a network connection. syslog-ng supports TCP
59logforwarding, together with hashing to prevent unauthorized
60modification on the line.
db55bc6c 61
6ab9000c
JR
62%description -l pl.UTF-8
63Syslog-ng jest zamiennikiem dla standardowo używanych programów typu
64sysklog. Działa w systemie SunOS, BSD, Linux. Daje znacznie większe
65możliwości logowania i kontrolowania zbieranych informacji.
db55bc6c 66
6ab9000c
JR
67%description -l pt_BR.UTF-8
68Syslog-ng é um substituto para o syslog tradicional, mas com diversas
02e7b20a 69melhorias, como, por exemplo, a habilidade de filtrar mensagens de log
6ab9000c 70por seu conteúdo (usando expressões regulares) e não apenas pelo par
02e7b20a 71facility/prioridade como o syslog original.
72
db55bc6c 73%prep
40b3220e 74%setup -q
489ceddf 75%patch0 -p1
db55bc6c 76
40b3220e 77%{__tar} xzf doc/reference/syslog-ng.html.tar.gz
b6fee34c 78
db55bc6c 79%build
9bb26796 80%{__aclocal}
4ce65bfa 81%{__autoconf}
82%{__automake}
c67bc54f 83%configure \
8eca2e89
JB
84 --sysconfdir=%{_sysconfdir}/syslog-ng \
85%if %{with dynamic}
86 --enable-dynamic-linking
87%endif
4298f6c0 88
84ad47e7 89%{__make}
db55bc6c 90
91%install
db55bc6c 92rm -rf $RPM_BUILD_ROOT
2a14aff2
ER
93install -d $RPM_BUILD_ROOT{/etc/{sysconfig,logrotate.d,rc.d/init.d},%{_sysconfdir}/syslog-ng} \
94 $RPM_BUILD_ROOT/var/log
db55bc6c 95
4d7c194a
PG
96%{__make} install \
97 DESTDIR=$RPM_BUILD_ROOT
db55bc6c 98
828bccc0 99install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng
a25388f3 100install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf
aa6d4755 101install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/syslog-ng
db55bc6c 102
210bfb29 103for n in daemon debug iptables kernel lpr maillog messages secure spooler syslog user xferlog
3fb60e3b
JR
104do
105 > $RPM_BUILD_ROOT/var/log/$n
106done
2a14aff2 107touch $RPM_BUILD_ROOT/etc/sysconfig/%{name}
db55bc6c 108
80a87a81
JB
109%clean
110rm -rf $RPM_BUILD_ROOT
111
db55bc6c 112%post
210bfb29 113for n in /var/log/{daemon,debug,iptables,kernel,lpr,maillog,messages,secure,spooler,syslog,user,xferlog}
db55bc6c 114do
115 [ -f $n ] && continue
c8aca4b9 116 touch $n
0aa6de83 117 chmod 640 $n
db55bc6c 118done
119
0b833f9b 120/sbin/chkconfig --add syslog-ng
da4f5bde 121%service syslog-ng restart "syslog-ng daemon"
db55bc6c 122
123%preun
0b833f9b 124if [ "$1" = "0" ]; then
da4f5bde 125 %service syslog-ng stop
0b833f9b 126 /sbin/chkconfig --del syslog-ng
127fi
db55bc6c 128
db55bc6c 129%files
a25388f3 130%defattr(644,root,root,755)
c67bc54f 131%doc doc/examples/syslog-ng.conf.sample doc/reference/syslog-ng.txt* contrib/syslog-ng.conf.{doc,RedHat}
63867a87 132%doc syslog-ng.html/*
2a14aff2 133%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
a25388f3 134%attr(750,root,root) %dir %{_sysconfdir}/syslog-ng
cc4597b5
ER
135%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/syslog-ng/syslog-ng.conf
136%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/syslog-ng
a25388f3 137%attr(754,root,root) /etc/rc.d/init.d/syslog-ng
302dff3f 138%attr(755,root,root) %{_sbindir}/syslog-ng
a25388f3 139%{_mandir}/man[58]/*
822b8fbf 140
3fb60e3b 141%attr(640,root,root) %ghost /var/log/*
This page took 0.126404 seconds and 4 git commands to generate.