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