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