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