%define mod_name watch
%define apxs /usr/sbin/apxs1
Summary: Apache module: Monitoring Interface for MRTG
-Summary(pl.UTF-8): Moduł do apache: Interfejs do monitorowania za pomocą MRTG
+Summary(pl.UTF-8): Moduł do apache: Interfejs do monitorowania za pomocą MRTG
Name: apache1-mod_%{mod_name}
Version: 3.18
Release: 4
Source1: %{name}.conf
Patch0: %{name}-PLD-v6stuff.patch
URL: http://www.snert.com/Software/mod_watch/
-BuildRequires: %{apxs}
#{?with_ipv6:BuildRequires: apache1(ipv6)-devel}
-BuildRequires: apache1-devel >= 1.3.33-2
+BuildRequires: apache1-devel >= 1.3.39
BuildRequires: rpmbuild(macros) >= 1.268
Requires: apache1(EAPI)
Obsoletes: apache-mod_watch <= 3.18
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
-%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
+%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
%description
This module will watch and collect the bytes, requests, and documents
mv mod_watch.html mod_watch_pl.html
+sed -e 's/<!--#/<!--/g' index.shtml > mod_watch.html
+
%build
%{__make} build-dynamic \
APXS=%{apxs}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
-install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
-
-sed -e 's/<!--#/<!--/g' index.shtml > mod_watch.html
+install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
else
# they're still using old apache.conf
sed -i -e '
- s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
+ s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/*_mod_%{mod_name}.conf,
' /etc/apache/apache.conf
fi
%service -q apache restart
%files
%defattr(644,root,root,755)
%doc CHANGES* *.html
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
%attr(755,root,root) %{_pkglibdir}/*