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