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