]> git.pld-linux.org Git - packages/syslog-ng.git/blob - syslog-ng.spec
- oops, rel.1
[packages/syslog-ng.git] / syslog-ng.spec
1 #
2 # Conditional build:
3 %bcond_with     dynamic         # link dynamically with glib and eventlog
4 #
5 %define         mainver         2.0
6 %define         minver          6
7
8 Summary:        Syslog-ng - new generation of the system logger
9 Summary(pl.UTF-8):      Syslog-ng - zamiennik syskloga
10 Summary(pt_BR.UTF-8):   Daemon de log nova geração
11 Name:           syslog-ng
12 Version:        %{mainver}.%{minver}
13 Release:        1
14 License:        GPL v2
15 Group:          Daemons
16 Source0:        http://www.balabit.com/downloads/files/syslog-ng/sources/stable/src/%{name}-%{version}.tar.gz
17 # Source0-md5:  16fa7595834765537650b390e93fe5e7
18 Source1:        %{name}.init
19 Source2:        %{name}.conf
20 Source3:        %{name}.logrotate
21 Patch0:         %{name}-link.patch
22 URL:            http://www.balabit.com/products/syslog_ng/
23 BuildRequires:  autoconf >= 2.53
24 BuildRequires:  automake
25 BuildRequires:  bison
26 BuildRequires:  flex
27 BuildRequires:  pkgconfig
28 BuildRequires:  rpmbuild(macros) >= 1.268
29 %if %{with dynamic}
30 BuildRequires:  eventlog-devel >= 0.2
31 BuildRequires:  glib2-devel >= 1:2.2.0
32 BuildRequires:  libnet-devel >= 1:1.1.2.1-3
33 BuildRequires:  libwrap-devel
34 %else
35 BuildRequires:  eventlog-static >= 0.2
36 BuildRequires:  glib2-static >= 1:2.2.0
37 BuildRequires:  libnet-static >= 1:1.1.2.1-3
38 BuildRequires:  libwrap-static
39 %endif
40 Requires(post): fileutils
41 Requires(post,preun):   /sbin/chkconfig
42 Requires:       logrotate
43 Requires:       psmisc >= 20.1
44 Requires:       rc-scripts >= 0.2.0
45 Provides:       syslogdaemon
46 Conflicts:      klogd
47 Conflicts:      msyslog
48 Conflicts:      syslog
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 syslog-ng is a syslogd replacement for unix and unix-like systems. It
53 has been tested on Solaris, BSDi and Linux, and were found to run
54 reliably. syslog-ng gives you a much enhanced configuration scheme,
55 which lets you filter messages based on not only priority/facility
56 pairs, but also on message content. You can use regexps to direct log
57 stream to different destinations. A destination can be anything from a
58 simple file to a network connection. syslog-ng supports TCP
59 logforwarding, together with hashing to prevent unauthorized
60 modification on the line.
61
62 %description -l pl.UTF-8
63 Syslog-ng jest zamiennikiem dla standardowo używanych programów typu
64 sysklog. Działa w systemie SunOS, BSD, Linux. Daje znacznie większe
65 możliwości logowania i kontrolowania zbieranych informacji.
66
67 %description -l pt_BR.UTF-8
68 Syslog-ng é um substituto para o syslog tradicional, mas com diversas
69 melhorias, como, por exemplo, a habilidade de filtrar mensagens de log
70 por seu conteúdo (usando expressões regulares) e não apenas pelo par
71 facility/prioridade como o syslog original.
72
73 %prep
74 %setup -q
75 %patch0 -p1
76
77 %{__tar} xzf doc/reference/syslog-ng.html.tar.gz
78
79 %build
80 %{__aclocal}
81 %{__autoconf}
82 %{__automake}
83 %configure \
84         --sysconfdir=%{_sysconfdir}/syslog-ng \
85 %if %{with dynamic}
86         --enable-dynamic-linking
87 %endif
88
89 %{__make}
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,logrotate.d,rc.d/init.d},%{_sysconfdir}/syslog-ng} \
94         $RPM_BUILD_ROOT/var/log
95
96 %{__make} install \
97         DESTDIR=$RPM_BUILD_ROOT
98
99 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng
100 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf
101 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/syslog-ng
102
103 for n in daemon debug iptables kernel lpr maillog messages secure spooler syslog user xferlog
104 do
105         > $RPM_BUILD_ROOT/var/log/$n
106 done
107 touch $RPM_BUILD_ROOT/etc/sysconfig/%{name}
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post
113 for n in /var/log/{daemon,debug,iptables,kernel,lpr,maillog,messages,secure,spooler,syslog,user,xferlog}
114 do
115         [ -f $n ] && continue
116         touch $n
117         chmod 640 $n
118 done
119
120 /sbin/chkconfig --add syslog-ng
121 %service syslog-ng restart "syslog-ng daemon"
122
123 %preun
124 if [ "$1" = "0" ]; then
125         %service syslog-ng stop
126         /sbin/chkconfig --del syslog-ng
127 fi
128
129 %files
130 %defattr(644,root,root,755)
131 %doc doc/examples/syslog-ng.conf.sample doc/reference/syslog-ng.txt* contrib/syslog-ng.conf.{doc,RedHat}
132 %doc syslog-ng.html/*
133 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
134 %attr(750,root,root) %dir %{_sysconfdir}/syslog-ng
135 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/syslog-ng/syslog-ng.conf
136 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/syslog-ng
137 %attr(754,root,root) /etc/rc.d/init.d/syslog-ng
138 %attr(755,root,root) %{_sbindir}/syslog-ng
139 %{_mandir}/man[58]/*
140
141 %attr(640,root,root) %ghost /var/log/*
This page took 0.065051 seconds and 4 git commands to generate.