]> git.pld-linux.org Git - packages/apache1-mod_accounting.git/blob - apache1-mod_accounting.spec
- adapterized.
[packages/apache1-mod_accounting.git] / apache1-mod_accounting.spec
1 %define         mod_name        accounting
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: records traffic statistics into a database
4 Summary(pl):    Modu³ do apache: zapisuje statystyki ruchu do relacyjnej bazy danych
5 Name:           apache-mod_%{mod_name}
6 Version:        0.4
7 Release:        1
8 License:        GPL
9 Group:          Networking/Daemons
10 Source0:        http://prdownloads.sourceforge.net/mod-acct/mod_%{mod_name}-%{version}.tar.gz
11 URL:            http://sourceforge.net/projects/mod-acct/
12 BuildRequires:  %{apxs}
13 BuildRequires:  apache-devel
14 BuildRequires:  zlib-devel
15 Prereq:         %{_sbindir}/apxs
16 Requires:       apache
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
20
21 %description
22 mod_accounting is a simple Apache module that can record traffic
23 statistics into a database (bytes in/out per http request).
24
25 %description -l pl
26 mod_accounting jest prostym modu³em Apacza, s³u¿±cym do zapisywania
27 statystyk ruchu do relacyjnej bazy danych (ilo¶æ bajtów
28 wchodz±cych/wychodz±cych na ¿±danie http)
29
30 %prep
31 %setup -q -n mod_%{mod_name}-%{version}
32
33 %build
34 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
35
36 %install
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT%{_pkglibdir}
39
40 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
41
42 %clean
43 rm -rf $RPM_BUILD_ROOT
44
45 %post
46 %{_sbindir}/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
47 if [ -f /var/lock/subsys/httpd ]; then
48         /etc/rc.d/init.d/httpd restart 1>&2
49 fi
50
51 %preun
52 if [ "$1" = "0" ]; then
53         %{_sbindir}/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
54         if [ -f /var/lock/subsys/httpd ]; then
55                 /etc/rc.d/init.d/httpd restart 1>&2
56         fi
57 fi
58
59 %files
60 %defattr(644,root,root,755)
61 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.0638570000000001 seconds and 4 git commands to generate.