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