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.UTF-8): 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 %{?with_ipv6:BuildRequires: apache1(ipv6)-devel}
19 BuildRequires: apache1-devel >= 1.3.39
20 BuildRequires: mysql-devel
21 BuildRequires: postgresql-devel
22 BuildRequires: rpmbuild(macros) >= 1.268
23 %{!?with_ipv6:BuildConflicts: apache1(ipv6)-devel}
24 Requires: apache1(EAPI)
25 Obsoletes: apache-mod_accounting <= 0.5
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
32 mod_accounting is a simple Apache module that can record traffic
33 statistics into a database (bytes in/out per HTTP request)
35 %description -l pl.UTF-8
36 mod_accounting to prosty moduł Apache pozwalający na zapisywanie
37 informacji o ruchu HTTP do bazy danych (bajty
38 przychodzące/wychodzące).
41 %setup -q -n mod_%{mod_name}-%{version}
44 PATH=$PATH:%{_sbindir}
47 LIB="-L%{_includedir}/postgresql -L%{_includedir}/mysql -lpq -lmysqlclient"
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
53 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
54 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
57 rm -rf $RPM_BUILD_ROOT
60 %service -q apache restart
63 if [ "$1" = "0" ]; then
64 %service -q apache restart
68 %defattr(644,root,root,755)
70 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
71 %attr(755,root,root) %{_pkglibdir}/*