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