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