2 %define apxs /usr/sbin/apxs1
3 Summary: Apache module: log the access_log and error_log log into the syslogd
4 Summary(pl): 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: %{apxs}
15 BuildRequires: apache1-devel >= 1.3.33-2
16 Requires(triggerpostun): %{apxs}
17 Requires(triggerpostun): grep
18 Requires(triggerpostun): sed >= 4.0
19 Requires: apache1 >= 1.3.33-2
20 Obsoletes: apache-mod_%{mod_name} <= %{version}
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
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 if [ -f /var/lock/subsys/apache ]; then
55 /etc/rc.d/init.d/apache restart 1>&2
59 if [ "$1" = "0" ]; then
60 if [ -f /var/lock/subsys/apache ]; then
61 /etc/rc.d/init.d/apache restart 1>&2
65 %triggerpostun -- %{name} < 0.0.5-2.1
66 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
67 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
69 /^Include.*mod_%{mod_name}\.conf/d
70 ' /etc/apache/apache.conf
72 # they're still using old apache.conf
74 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
75 ' /etc/apache/apache.conf
77 if [ -f /var/lock/subsys/apache ]; then
78 /etc/rc.d/init.d/apache restart 1>&2
82 %defattr(644,root,root,755)
83 %doc ChangeLog README TODO
84 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
85 %attr(755,root,root) %{_pkglibdir}/*