]> git.pld-linux.org Git - packages/apache1-mod_watch.git/blame_incremental - apache1-mod_watch.spec
- update config dir macro
[packages/apache1-mod_watch.git] / apache1-mod_watch.spec
... / ...
CommitLineData
1# TODO
2# - strange error when accessing "/~watch-info":
3# [Thu Feb 10 03:16:16 2005] [warn] " 1\n\b" concurrency counter went negative; resetting to zero
4
5%bcond_without ipv6 # disable IPv6 support
6
7%define mod_name watch
8%define apxs /usr/sbin/apxs1
9Summary: Apache module: Monitoring Interface for MRTG
10Summary(pl.UTF-8): Moduł do apache: Interfejs do monitorowania za pomocą MRTG
11Name: apache1-mod_%{mod_name}
12Version: 3.18
13Release: 4
14License: BSD
15Group: Networking/Daemons
16Source0: http://www.snert.com/Software/download/mod_watch%(echo %{version} | tr -d .).tgz
17# Source0-md5: 1409df800f24214bed16ca753b9967ff
18Source1: %{name}.conf
19Patch0: %{name}-PLD-v6stuff.patch
20URL: http://www.snert.com/Software/mod_watch/
21#{?with_ipv6:BuildRequires: apache1(ipv6)-devel}
22BuildRequires: apache1-devel >= 1.3.39
23BuildRequires: rpmbuild(macros) >= 1.268
24Requires: apache1(EAPI)
25Obsoletes: apache-mod_watch <= 3.18
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
30
31%description
32This module will watch and collect the bytes, requests, and documents
33in & out per virtual host, file owner, remote-ip address, directory or
34location, and the web server as a whole. This module was designed for
35use with MRTG, which will make nice graphical representations of the
36data, but is general enough that it can be applied to other purposes,
37as the raw data is accessed by a URL. This module supports
38mod_vhost_alias and mod_gzip.
39
40%description -l pl.UTF-8
41Ten moduł kontroluje i zbiera informacje na temat ilości przesłanych
42bajtów (przychodzących i wychodzących) wg. serwera wirtualnego,
43właściciela plików, zdalnego adresu ip, katalogu lub lokacji oraz
44serwera jako całości. Moduł został zaprojektowany do pracy z MRTG,
45dzięki czemu otrzymamy ładną, graficzną reprezentacje danych. Moduł
46wspiera mod_vhost_alias oraz mod_gzip.
47
48%prep
49%setup -q -n mod_%{mod_name}-%{version}
50%{?with_ipv6:%patch -p0}
51
52mv mod_watch.html mod_watch_pl.html
53
54sed -e 's/<!--#/<!--/g' index.shtml > mod_watch.html
55
56%build
57%{__make} build-dynamic \
58 APXS=%{apxs}
59
60%install
61rm -rf $RPM_BUILD_ROOT
62install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
63
64install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
65cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
66
67%clean
68rm -rf $RPM_BUILD_ROOT
69
70%post
71%service -q apache restart
72
73%postun
74if [ "$1" = "0" ]; then
75 %service -q apache restart
76fi
77
78%triggerpostun -- %{name} < 3.18-1.1
79if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
80 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
81 sed -i -e '
82 /^Include.*mod_%{mod_name}\.conf/d
83 ' /etc/apache/apache.conf
84else
85 # they're still using old apache.conf
86 sed -i -e '
87 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/*_mod_%{mod_name}.conf,
88 ' /etc/apache/apache.conf
89fi
90%service -q apache restart
91
92%files
93%defattr(644,root,root,755)
94%doc CHANGES* *.html
95%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
96%attr(755,root,root) %{_pkglibdir}/*
This page took 0.087777 seconds and 5 git commands to generate.