2 %define apxs /usr/sbin/apxs
3 %include /usr/lib/rpm/macros.perl
4 Summary: Apache module: Monitoring Interface for MRTG
5 Summary(pl): Modu³ do apache: Interfejs do monitorowania za pomoc± MRTG
6 Name: apache-mod_%{mod_name}
10 Group: Networking/Daemons
11 Source0: http://www.snert.com/Software/download/mod_watch%(echo %{version} | tr -d .).tgz
12 # Source0-md5: 06d57713adb935f16596d22256bca913
14 Patch0: %{name}-apr-fix.patch
15 URL: http://www.snert.com/Software/mod_watch/
16 BuildRequires: %{apxs}
17 BuildRequires: apache-devel >= 2.0.52-2
18 BuildRequires: rpm-perlprov
19 Requires: apache(modules-api) = %apache_modules_api
20 Requires: apache >= 2.0.52-2
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 module will watch and collect the bytes, requests, and documents
28 in & out per virtual host, file owner, remote IP address, directory or
29 location, and the web server as a whole. This module was designed for
30 use with MRTG, which will make nice graphical representations of the
31 data, but is general enough that it can be applied to other purposes,
32 as the raw data is accessed by a URL. This module supports
33 mod_vhost_alias and mod_gzip.
36 Ten modu³ kontroluje i zbiera informacje na temat ilo¶ci przes³anych
37 bajtów (przychodz±cych i wychodz±cych) wg. serwera wirtualnego,
38 w³a¶ciciela plików, zdalnego adresu IP, katalogu lub lokacji oraz
39 serwera jako ca³o¶ci. Modu³ zosta³ zaprojektowany do pracy z MRTG,
40 dziêki czemu otrzymamy ³adn±, graficzn± reprezentacje danych. Modu³
41 wspiera mod_vhost_alias oraz mod_gzip.
44 %setup -q -n mod_%{mod_name}-4.3
48 %{__make} -f Makefile.dso build \
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_bindir},%{_sysconfdir}/httpd.conf}
55 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
56 install apache2mrtg.pl mod_watch.pl $RPM_BUILD_ROOT%{_bindir}
57 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/99_mod_watch.conf
60 rm -rf $RPM_BUILD_ROOT
63 if [ -f /var/lock/subsys/httpd ]; then
64 /etc/rc.d/init.d/httpd restart 1>&2
68 if [ "$1" = "0" ]; then
69 if [ -f /var/lock/subsys/httpd ]; then
70 /etc/rc.d/init.d/httpd restart 1>&2
75 %defattr(644,root,root,755)
76 %doc CHANGES* *html *.txt Contrib nfields.pl
77 %attr(755,root,root) %{_bindir}/*
78 %attr(755,root,root) %{_pkglibdir}/*
79 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/99_mod_watch.conf