]> git.pld-linux.org Git - packages/apache-mod_watch.git/blob - apache-mod_watch.spec
- unified
[packages/apache-mod_watch.git] / apache-mod_watch.spec
1 # TODO
2 # - package -DSTATEDIR=/var/lib/mod_watch ?
3 %define         mod_name        watch
4 %define         apxs            /usr/sbin/apxs
5 %include        /usr/lib/rpm/macros.perl
6 Summary:        Apache module: Monitoring Interface for MRTG
7 Summary(pl):    Modu³ do apache: Interfejs do monitorowania za pomoc± MRTG
8 Name:           apache-mod_%{mod_name}
9 Version:        4.03
10 Release:        5
11 License:        BSD
12 Group:          Networking/Daemons
13 Source0:        http://www.snert.com/Software/download/mod_watch%(echo %{version} | tr -d .).tgz
14 # Source0-md5:  06d57713adb935f16596d22256bca913
15 Source1:        %{name}.conf
16 Patch0:         %{name}-apr-fix.patch
17 URL:            http://www.snert.com/Software/mod_watch/
18 BuildRequires:  %{apxs}
19 BuildRequires:  apache-devel >= 2.0.52-2
20 BuildRequires:  rpm-perlprov
21 Requires:       apache(modules-api) = %apache_modules_api
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
25 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
26
27 %description
28 This module will watch and collect the bytes, requests, and documents
29 in & out per virtual host, file owner, remote IP address, directory or
30 location, and the web server as a whole. This module was designed for
31 use with MRTG, which will make nice graphical representations of the
32 data, but is general enough that it can be applied to other purposes,
33 as the raw data is accessed by a URL. This module supports
34 mod_vhost_alias and mod_gzip.
35
36 %description -l pl
37 Ten modu³ kontroluje i zbiera informacje na temat ilo¶ci przes³anych
38 bajtów (przychodz±cych i wychodz±cych) wg. serwera wirtualnego,
39 w³a¶ciciela plików, zdalnego adresu IP, katalogu lub lokacji oraz
40 serwera jako ca³o¶ci. Modu³ zosta³ zaprojektowany do pracy z MRTG,
41 dziêki czemu otrzymamy ³adn±, graficzn± reprezentacje danych. Modu³
42 wspiera mod_vhost_alias oraz mod_gzip.
43
44 %prep
45 %setup -q -n mod_%{mod_name}-4.3
46 %patch0 -p1
47
48 %build
49 %{__make} -f Makefile.dso build \
50         APXS=%{apxs}
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_bindir},%{_sysconfdir}/httpd.conf}
55
56 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
57 install apache2mrtg.pl mod_watch.pl $RPM_BUILD_ROOT%{_bindir}
58 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/99_mod_watch.conf
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %post
64 if [ -f /var/lock/subsys/httpd ]; then
65         /etc/rc.d/init.d/httpd restart 1>&2
66 fi
67
68 %preun
69 if [ "$1" = "0" ]; then
70         if [ -f /var/lock/subsys/httpd ]; then
71                 /etc/rc.d/init.d/httpd restart 1>&2
72         fi
73 fi
74
75 %files
76 %defattr(644,root,root,755)
77 %doc CHANGES* *html *.txt Contrib nfields.pl
78 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
79 %attr(755,root,root) %{_pkglibdir}/*.so
80 %attr(755,root,root) %{_bindir}/*
This page took 0.059688 seconds and 4 git commands to generate.