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