1 |
%define _disable_ld_no_undefined 1 |
2 |
%define evtlog_ver 0.2.12 |
3 |
|
4 |
%define name syslog-ng |
5 |
%define version 3.3.8 |
6 |
%define release %mkrel 2 |
7 |
|
8 |
%define major 0 |
9 |
%define libname %mklibname syslog-ng %{major} |
10 |
%define develname %mklibname syslog-ng -d |
11 |
|
12 |
Name: %{name} |
13 |
Version: %{version} |
14 |
Release: %{release} |
15 |
Summary: Syslog-ng daemon |
16 |
Group: System/Kernel and hardware |
17 |
License: GPLv2 LGPLv2+ |
18 |
Url: http://www.balabit.com/products/syslog_ng/ |
19 |
Source0: http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/%{version}/source/%{name}_%{version}.tar.gz |
20 |
Source1: http://www.balabit.com/support/documentation/syslog-ng-ose-v3.2-guide-admin-en.pdf |
21 |
Source2: syslog-ng.sysconfig |
22 |
Source3: syslog-ng.conf |
23 |
Source4: syslog-ng.logrotate |
24 |
Source5: syslog-ng.tmpfiles |
25 |
Patch0: syslog-ng-3.3.8-service-configuration.patch |
26 |
BuildRequires: flex |
27 |
BuildRequires: bison |
28 |
BuildRequires: eventlog-devel >= %{evtlog_ver} |
29 |
BuildRequires: net-devel >= 1.1.3 |
30 |
BuildRequires: glib2-devel |
31 |
BuildRequires: libwrap-devel |
32 |
BuildRequires: openssl-devel |
33 |
BuildRequires: dbi-devel |
34 |
BuildRequires: cap-devel |
35 |
Provides: syslog-daemon |
36 |
Requires: %{libname} = %{version}-%{release} |
37 |
Requires(post): systemd >= %{systemd_required_version} |
38 |
Requires(post): rpm-helper >= 0.24.8-1 |
39 |
Requires(preun): rpm-helper >= 0.24.8-1 |
40 |
|
41 |
%description |
42 |
Syslog-ng is a flexible and highly scalable system logging application |
43 |
that is ideal for creating centralized and trusted logging solutions. |
44 |
Syslog-ng enables you to send the log messages of your hosts to remote |
45 |
servers using the latest protocol standards : TCP, TLS, X.509 certificates. |
46 |
Syslog-ng is able to store log messages in the most popular databases : |
47 |
MySQL, PostgreSQL SQLite, Oracle and MSSQL. Syslog-ng can sort the incoming |
48 |
log messages based on their content and various parameters like the source |
49 |
host, application, and priority. Directories, files and database tables can |
50 |
be created dynamically using macros. Complex filtering using regular |
51 |
expressions and boolean operators offers almost unlimited flexibility to |
52 |
forward only the important log messages to the selected destinations. |
53 |
|
54 |
%package -n %{libname} |
55 |
Summary: Libraries for %{name} |
56 |
Group: Development/C |
57 |
|
58 |
%description -n %{libname} |
59 |
The libraries for %{name}. |
60 |
|
61 |
%package -n %develname |
62 |
Summary: Development files for %{name} |
63 |
Group: Development/C |
64 |
Provides: %{name}-devel |
65 |
Requires: %{libname} = %{version}-%{release} |
66 |
|
67 |
%description -n %develname |
68 |
This package contains libraries and header files for |
69 |
developing applications that use %{name}. |
70 |
|
71 |
%prep |
72 |
%setup -q -n %{name}-%{version} |
73 |
%patch0 -p 1 |
74 |
|
75 |
cp %{SOURCE1} . |
76 |
|
77 |
%build |
78 |
%configure2_5x \ |
79 |
--prefix=%{_prefix} \ |
80 |
--sysconfdir=%{_sysconfdir}/%{name} \ |
81 |
--localstatedir=%{_localstatedir}/lib/%{name} \ |
82 |
--datadir=%{_datadir}/%{name} \ |
83 |
--with-module-dir=/%{_libdir}/%{name} \ |
84 |
--with-pidfile-dir=/run/syslog-ng \ |
85 |
--with-systemdsystemunitdir=%{_unitdir} \ |
86 |
--enable-ipv6 \ |
87 |
--enable-linux-caps \ |
88 |
--enable-pacct \ |
89 |
--enable-spoof-source \ |
90 |
--enable-ssl \ |
91 |
--enable-tcp-wrapper \ |
92 |
--enable-shared \ |
93 |
--disable-static \ |
94 |
--enable-dynamic-linking \ |
95 |
--enable-systemd |
96 |
# --enable-env-wrapper \ |
97 |
%make |
98 |
|
99 |
%install |
100 |
rm -rf %{buildroot} |
101 |
|
102 |
%makeinstall_std |
103 |
|
104 |
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/syslog-ng/syslog-ng.conf |
105 |
install -d -m 755 %{buildroot}%{_sysconfdir}/syslog-ng/conf.d |
106 |
install -d -m 755 %{buildroot}%{_sysconfdir}/syslog-ng/patterndb.d |
107 |
|
108 |
install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/syslog-ng |
109 |
|
110 |
install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/syslog-ng |
111 |
|
112 |
install -D -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf |
113 |
|
114 |
install -d -m 755 %{buildroot}%{_localstatedir}/lib/syslog-ng |
115 |
|
116 |
# install the ld.so conf file |
117 |
install -d -m 755 %{buildroot}%{_sysconfdir}/ld.so.conf.d/ |
118 |
cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf <<EOF |
119 |
%{_libdir}/%{name} |
120 |
EOF |
121 |
|
122 |
rm -f %{buildroot}%{_libdir}/*.la |
123 |
|
124 |
%post |
125 |
%_tmpfilescreate %{name} |
126 |
%_post_service %{name} |
127 |
# (cg) Handle a quirk of syslog service installations |
128 |
if [ -f %{_sysconfdir}/systemd/system/multi-user.target.wants/%{name}.service -a ! -f %{_sysconfdir}/systemd/system/syslog.service ]; then |
129 |
cp -a %{_sysconfdir}/systemd/system/multi-user.target.wants/%{name}.service %{_sysconfdir}/systemd/system/syslog.service |
130 |
fi |
131 |
|
132 |
%preun |
133 |
%_preun_service %{name} |
134 |
|
135 |
%files |
136 |
%doc AUTHORS ChangeLog COPYING NEWS VERSION |
137 |
%doc doc/security doc/xsd |
138 |
%doc syslog-ng-ose-v3.2-guide-admin-en.pdf |
139 |
%dir %{_sysconfdir}/syslog-ng |
140 |
%dir %{_sysconfdir}/syslog-ng/conf.d |
141 |
%dir %{_sysconfdir}/syslog-ng/patterndb.d |
142 |
%config(noreplace) %{_sysconfdir}/syslog-ng/syslog-ng.conf |
143 |
%config(noreplace) %{_sysconfdir}/syslog-ng/modules.conf |
144 |
%config(noreplace) %{_sysconfdir}/syslog-ng/scl.conf |
145 |
%config(noreplace) %{_sysconfdir}/sysconfig/syslog-ng |
146 |
%config(noreplace) %{_sysconfdir}/logrotate.d/syslog-ng |
147 |
%{_unitdir}/syslog-ng.service |
148 |
%{_tmpfilesdir}/%{name}.conf |
149 |
%{_sysconfdir}/ld.so.conf.d/%{name}.conf |
150 |
%{_sbindir}/syslog-ng |
151 |
%{_sbindir}/syslog-ng-ctl |
152 |
%{_libdir}/syslog-ng |
153 |
%{_bindir}/loggen |
154 |
%{_bindir}/pdbtool |
155 |
%{_bindir}/update-patterndb |
156 |
%{_datadir}/syslog-ng |
157 |
%{_mandir}/man1/pdbtool.1* |
158 |
%{_mandir}/man1/loggen.1* |
159 |
%{_mandir}/man1/syslog-ng-ctl.1* |
160 |
%{_mandir}/man5/syslog-ng.conf.5* |
161 |
%{_mandir}/man8/syslog-ng.8* |
162 |
%{_localstatedir}/lib/syslog-ng |
163 |
|
164 |
%files -n %{libname} |
165 |
%{_libdir}/libsyslog-ng-%{version}.so |
166 |
|
167 |
%files -n %{develname} |
168 |
%{_libdir}/libsyslog-ng.so |
169 |
%{_libdir}/pkgconfig/syslog-ng.pc |
170 |
%{_includedir}/syslog-ng |