]> git.pld-linux.org Git - packages/apache1-mod_accounting.git/blob - apache1-mod_accounting.spec
- for confdir enabled apache1
[packages/apache1-mod_accounting.git] / apache1-mod_accounting.spec
1 # TODO
2 # - ipv6 patch not implemented
3 %bcond_without  ipv6            # disable IPv6 support
4
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}
10 Version:        0.5
11 Release:        0.4
12 License:        BSD
13 Group:          Networking/Daemons
14 Source0:        http://dl.sourceforge.net/mod-acct/mod_accounting-%{version}.tar.gz
15 # Source0-md5:  fc045bbdc5ae32241765fea2967a63fb
16 Source1:        %{name}.conf
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)
26
27 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
28 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
29
30 %description
31 mod_accounting is a simple Apache module that can record traffic
32 statistics into a database (bytes in/out per HTTP request)
33
34 %description -l pl
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).
38
39 %prep
40 %setup -q -n mod_%{mod_name}-%{version}
41
42 %build
43 PATH=$PATH:%{_sbindir}
44 %{__make} \
45         APXS=%{apxs} \
46         LIB="-L%{_includedir}/postgresql -L%{_includedir}/mysql -lpq -lmysqlclient"
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
51
52 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
53 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 if [ -f /var/lock/subsys/apache ]; then
60         /etc/rc.d/init.d/apache restart 1>&2
61 fi
62
63 %preun
64 if [ "$1" = "0" ]; then
65         if [ -f /var/lock/subsys/apache ]; then
66                 /etc/rc.d/init.d/apache restart 1>&2
67         fi
68 fi
69
70 %files
71 %defattr(644,root,root,755)
72 %doc README ChangeLog
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}/*
This page took 0.079299 seconds and 3 git commands to generate.