]> git.pld-linux.org Git - packages/syslog-ng.git/blob - syslog-ng.spec
658fb0c92b2380e75d84b12f6002463919330dd2
[packages/syslog-ng.git] / syslog-ng.spec
1 Summary:        Syslog-ng - new generation of the system logger
2 Summary(pl):    Syslog-ng - zamiennik syskloga
3 Summary(pt_BR): Daemon de log nova geração
4 Name:           syslog-ng
5 Version:        1.4.15
6 Release:        3
7 License:        GPL
8 Group:          Daemons
9 Source0:        http://www.balabit.hu/downloads/syslog-ng/1.4/%{name}-%{version}.tar.gz
10 Source1:        %{name}.init
11 Source2:        %{name}.conf
12 Source3:        %{name}.logrotate
13 Patch0:         %{name}-autoconf.patch
14 Patch1:         %{name}-notestlibolver.patch
15 Patch2:         %{name}-ac25x.patch
16 URL:            http://www.balabit.hu/products/syslog-ng/
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  flex
20 BuildRequires:  libol-static >= 0.2.21
21 Prereq:         rc-scripts >= 0.2.0
22 Requires(post,preun):   /sbin/chkconfig
23 Requires:       logrotate
24 Requires:       fileutils
25 Requires:       psmisc >= 20.1
26 Provides:       syslogdaemon
27 Obsoletes:      syslog
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _sysconfdir     /etc
31
32 %description
33 syslog-ng is a syslogd replacement for unix and unix-like systems. It
34 has been tested on Solaris, BSDi and Linux, and were found to run
35 reliably. syslog-ng gives you a much enhanced configuration scheme,
36 which lets you filter messages based on not only priority/facility
37 pairs, but also on message content. You can use regexps to direct log
38 stream to different destinations. A destination can be anything from a
39 simple file to a network connection. syslog-ng supports TCP
40 logforwarding, together with hashing to prevent unauthorized
41 modification on the line.
42
43 %description -l pl
44 Syslog-ng jest zamiennikiem dla standartowo u¿ywanych programów typu
45 sysklog. Dzia³a w systemie SunOS, BSD, Linux. Daje znacznie wiêksze
46 mo¿liwo¶ci logowania i kontrolowania zbieranych informacji.
47
48 %description -l pt_BR
49 Syslog-ng é um substituto para o syslog tradicional, mas com diversas
50 melhorias, como, por exemplo, a habilidade de filtrar mensagens de log
51 por seu conteúdo (usando expressões regulares) e não apenas pelo par
52 facility/prioridade como o syslog original.
53
54 %prep
55 %setup -q
56 %patch0 -p1
57 %patch1 -p0
58 %patch2 -p1
59
60 %build
61 rm -f missing
62 aclocal
63 %{__autoconf}
64 %{__automake}
65 %configure
66 %{__make}
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/{syslog-ng,logrotate.d}} \
71         $RPM_BUILD_ROOT/var/log/{archiv,}/{news,mail}
72
73 %{__make} DESTDIR=$RPM_BUILD_ROOT install
74
75 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng
76 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf
77 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/syslog-ng
78
79 gzip -9nf doc/syslog-ng.conf.{demo,sample} doc/sgml/syslog-ng.txt \
80
81 touch $RPM_BUILD_ROOT/var/log/syslog
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post
87 for n in /var/log/{kernel,messages,secure,maillog,spooler,debug,cron,syslog,daemon,lpr,user,ppp,mail/{info,warn,err}}
88 do
89         [ -f $n ] && continue
90         touch $n
91         chmod 640 $n
92 done
93
94 /sbin/chkconfig --add syslog-ng
95 if [ -f /var/lock/subsys/syslog-ng ]; then
96         /etc/rc.d/init.d/syslog-ng restart >/dev/null 2>&1
97 else
98         echo "Run \"/etc/rc.d/init.d/syslog-ng start\" to start syslog-ng daemon."
99 fi
100 if [ -f /var/lock/subsys/klogd ]; then
101         /etc/rc.d/init.d/klogd restart 1>&2
102 fi
103
104 %preun
105 if [ "$1" = "0" ]; then
106         if [ -f /var/lock/subsys/syslog-ng ]; then
107                 /etc/rc.d/init.d/syslog-ng stop >&2
108         fi
109         /sbin/chkconfig --del syslog-ng
110 fi
111
112 %files
113 %defattr(644,root,root,755)
114 %doc doc/*.gz doc/sgml/syslog-ng.txt*
115 %attr(750,root,root) %dir %{_sysconfdir}/syslog-ng
116 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/syslog-ng/syslog-ng.conf
117 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/logrotate.d/syslog-ng
118 %attr(754,root,root) /etc/rc.d/init.d/syslog-ng
119 %attr(755,root,root) %{_sbindir}/syslog-ng
120 %{_mandir}/man[58]/*
121
122 %attr(640,root,root) %ghost /var/log/syslog
123 %attr(750,root,root) %ghost /var/log/news
124 %attr(750,root,root) %dir /var/log/mail
125 %attr(750,root,root) %dir /var/log/archiv/mail
This page took 0.060146 seconds and 3 git commands to generate.