]> git.pld-linux.org Git - packages/apache-mod_watch.git/blob - apache-mod_watch.spec
- fixed to work with apr >= 1.0
[packages/apache-mod_watch.git] / apache-mod_watch.spec
1 %define         mod_name        watch
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}
7 Version:        4.03
8 Release:        4
9 License:        BSD
10 Group:          Networking/Daemons
11 Source0:        http://www.snert.com/Software/download/mod_watch%(echo %{version} | tr -d .).tgz
12 # Source0-md5:  06d57713adb935f16596d22256bca913
13 Source1:        %{name}.conf
14 Patch0:         %{name}-apr-fix.patch
15 URL:            http://www.snert.com/Software/mod_watch/
16 BuildRequires:  %{apxs}
17 BuildRequires:  apache-devel >= 2
18 #Requires(post,preun):  %{apxs}
19 Requires(post,preun):   grep
20 Requires(preun):        fileutils
21 Requires:       apache >= 2
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
25 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR)
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, w³a¶ciciela
39 plików, zdalnego adresu ip, katalogu lub lokacji oraz serwera jako ca³o¶ci.
40 Modu³ zosta³ zaprojektowany do pracy z MRTG, dziêki czemu otrzymamy ³adn±,
41 graficzn± reprezentacje danych. Modu³ wspiera mod_vhost_alias oraz mod_gzip.
42
43 %prep
44 %setup -q -n mod_%{mod_name}-4.3
45 %patch0 -p1
46
47 %build
48 %{__make} -f Makefile.dso build \
49         APXS=%{apxs}
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_bindir},%{_sysconfdir}/httpd.conf}
54
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
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post
63 #%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
64 if [ -f /var/lock/subsys/httpd ]; then
65         /etc/rc.d/init.d/httpd restart 1>&2
66 else
67         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
68 fi
69
70 %preun
71 if [ "$1" = "0" ]; then
72 #       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
73         umask 027
74         if [ -f /var/lock/subsys/httpd ]; then
75                 /etc/rc.d/init.d/httpd restart 1>&2
76         fi
77 fi
78
79 %files
80 %defattr(644,root,root,755)
81 %doc CHANGES* *html *.txt Contrib nfields.pl
82 %attr(755,root,root) %{_bindir}/*
83 %attr(755,root,root) %{_pkglibdir}/*
84 %{_sysconfdir}/httpd.conf/99_mod_watch.conf
This page took 0.041655 seconds and 4 git commands to generate.