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