]> git.pld-linux.org Git - packages/apache-mod_watch.git/blob - apache-mod_watch.spec
- release up, better IPv6 workaround
[packages/apache-mod_watch.git] / apache-mod_watch.spec
1 %define         mod_name        watch
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: Monitoring Interface for MRTG
4 Summary(pl):    Modu³ do apache: Interfejs do monitorowania za pomoc± MRTG
5 Name:           apache-mod_%{mod_name}
6 Version:        3.13
7 Release:        2
8 License:        BSD
9 Group:          Networking/Daemons
10 Source0:        http://www.snert.com/Software/mod_watch/mod_watch%(echo %{version} | sed -e "s#\.##g").tgz
11 Source1:        %{name}.conf
12 Patch0:         %{name}-PLD-v6stuff.patch
13 URL:            http://www.snert.com/Software/mod_watch/
14 BuildRequires:  %{apxs}
15 BuildRequires:  apache(EAPI)-devel
16 Prereq:         %{_sbindir}/apxs
17 Requires:       apache(EAPI)
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
21
22 %description
23 This module will watch and collect the bytes, requests, and documents
24 in & out per virtual host, file owner, remote-ip address, directory or
25 location, and the web server as a whole. This module was designed for
26 use with MRTG, which will make nice graphical representations of the
27 data, but is general enough that it can be applied to other purposes,
28 as the raw data is accessed by a URL. This module supports
29 mod_vhost_alias and mod_gzip.
30
31 %description -l pl
32 Ten modu³ kontroluje i zbiera informacje na temat ilo¶ci przes³anych
33 bajtów (przychodz±cych i wychodz±cych) wg. serwera wirtualnego, w³a¶ciciela
34 plików, zdalnego adresu ip, katalogu lub lokacji oraz serwera jako ca³o¶ci.
35 Modu³ zosta³ zaprojektowany do pracy z MRTG, dziêki czemu otrzymamy ³adn±,
36 graficzn± reprezentacje danych. Modu³ wspiera mod_vhost_alias oraz mod_gzip.
37
38 %prep
39 %setup -q -n mod_%{mod_name}-%{version}
40 %patch -p0
41
42 %build
43 %{__make} build-dynamic
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd}
48
49 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
50 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/mod_watch.conf
51
52 %post
53 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
54 if [ -f %{_sysconfdir}/httpd/httpd.conf ] && \
55    ! grep -q "^Include.*mod_watch.conf" %{_sysconfdir}/httpd/httpd.conf; then
56         echo Include %{_sysconfdir}/httpd/mod_watch.conf >> %{_sysconfdir}/httpd/httpd.conf
57 fi
58 if [ -f /var/lock/subsys/httpd ]; then
59         %{_sysconfdir}/rc.d/init.d/httpd restart 1>&2
60 else
61         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
62 fi
63
64 %preun
65 if [ "$1" = "0" ]; then
66         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
67         grep -v "^Include.*mod_watch.conf" %{_sysconfdir}/httpd/httpd.conf > \
68                 %{_sysconfdir}/httpd/httpd.conf.tmp
69         mv -f %{_sysconfdir}/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
70         if [ -f /var/lock/subsys/httpd ]; then
71                 %{_sysconfdir}/rc.d/init.d/httpd restart 1>&2
72         fi
73 fi
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %files
79 %defattr(644,root,root,755)
80 %doc CHANGES* *.html
81 %attr(755,root,root) %{_pkglibdir}/*
82 %{_sysconfdir}/httpd/mod_watch.conf
This page took 0.032147 seconds and 4 git commands to generate.