2 %define apxs /usr/sbin/apxs1
3 Summary: Apache module: log the access_log and error_log log into the syslogd
4 Summary(pl.UTF-8): Moduł do apache przekazujący access_log i error_log do demona syslogd
5 Name: apache1-mod_%{mod_name}
9 Group: Networking/Daemons
10 Source0: http://savannah.nongnu.org/download/mod-witch/mod-witch.pkg/%{version}/mod-witch-%{version}.tar.gz
11 # Source0-md5: a2ffe2f9e28947426321615e2ba57fc7
13 URL: http://savannah.nongnu.org/projects/mod-witch/
14 BuildRequires: apache1-devel >= 1.3.39
15 BuildRequires: rpmbuild(macros) >= 1.268
16 Requires(triggerpostun): %{apxs}
17 Requires(triggerpostun): grep
18 Requires(triggerpostun): sed >= 4.0
19 Requires: apache1(EAPI)
20 Obsoletes: apache-mod_witch <= 0.0.5
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
24 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
27 This mod_witch apache module project intend to help the Apache web
28 server to log the access_log and error_log log into the syslogd, this
29 way apache will be able to log onto a remote logger machine with the
32 %description -l pl.UTF-8
33 Moduł apache'a mod_witch ma pomóc serwerowi WWW apache przekazywać
34 logi access_log i error_log do syslogd, umożliwiając w ten sposób
35 logowanie na inną maszynę.
38 %setup -q -n mod-%{mod_name}-%{version}
41 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
47 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
48 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
51 rm -rf $RPM_BUILD_ROOT
54 %service -q apache restart
57 if [ "$1" = "0" ]; then
58 %service -q apache restart
61 %triggerpostun -- %{name} < 0.0.5-2.1
62 if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
63 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
65 /^Include.*mod_%{mod_name}\.conf/d
66 ' /etc/apache/apache.conf
68 # they're still using old apache.conf
70 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
71 ' /etc/apache/apache.conf
73 if [ -f /var/lock/subsys/apache ]; then
74 /etc/rc.d/init.d/apache restart 1>&2
78 %defattr(644,root,root,755)
79 %doc ChangeLog README TODO
80 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
81 %attr(755,root,root) %{_pkglibdir}/*