2 # - ipv6 patch not implemented
3 %bcond_without ipv6 # disable IPv6 support
5 %define mod_name accounting
6 %define apxs %{_sbindir}/apxs1
7 Summary: Apache module: record traffic statistics into a database
8 Summary(pl): Modu³ do apache: zapisuje statystyki ruchu do bazy danych
9 Name: apache1-mod_%{mod_name}
13 Group: Networking/Daemons
14 Source0: http://dl.sourceforge.net/mod-acct/mod_accounting-%{version}.tar.gz
15 # Source0-md5: fc045bbdc5ae32241765fea2967a63fb
17 URL: http://sourceforge.net/projects/mod-acct/
18 BuildRequires: apache1-devel >= 1.3.33-2
19 BuildRequires: mysql-devel
20 BuildRequires: postgresql-devel
21 %{?with_ipv6:BuildRequires: apache1(ipv6)-devel}
22 %{!?with_ipv6:BuildConflicts: apache1(ipv6)-devel}
23 Requires: apache1 >= 1.3.33-2
24 Obsoletes: apache-mod_%{mod_name} <= %{version}
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
28 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
31 mod_accounting is a simple Apache module that can record traffic
32 statistics into a database (bytes in/out per HTTP request)
35 mod_accounting to prosty modu³ Apache pozwalaj±cy na zapisywanie
36 informacji o ruchu HTTP do bazy danych (bajty
37 przychodz±ce/wychodz±ce).
40 %setup -q -n mod_%{mod_name}-%{version}
43 PATH=$PATH:%{_sbindir}
46 LIB="-L%{_includedir}/postgresql -L%{_includedir}/mysql -lpq -lmysqlclient"
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
52 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
53 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
56 rm -rf $RPM_BUILD_ROOT
59 if [ -f /var/lock/subsys/apache ]; then
60 /etc/rc.d/init.d/apache restart 1>&2
64 if [ "$1" = "0" ]; then
65 if [ -f /var/lock/subsys/apache ]; then
66 /etc/rc.d/init.d/apache restart 1>&2
71 %defattr(644,root,root,755)
73 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
74 %attr(755,root,root) %{_pkglibdir}/*