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