]> git.pld-linux.org Git - packages/apache-mod_whatkilledus.git/blame - apache-mod_whatkilledus.spec
- update config
[packages/apache-mod_whatkilledus.git] / apache-mod_whatkilledus.spec
CommitLineData
070fd57c
AM
1%define mod_name whatkilledus
2%define apxs /usr/sbin/apxs
9bb3fada 3Summary: Apache module: logs request when child process crashes
070fd57c 4Name: apache-mod_%{mod_name}
9bb3fada
AM
5Version: 0.1
6Release: 0.20040323.1
7License: Apache v2.0
070fd57c
AM
8Group: Networking/Daemons
9Source0: http://people.apache.org/~trawick/mod_whatkilledus.c
10# Source0-md5: e59c5d56e294a31e5b158ad5e4553001
9bb3fada
AM
11Source1: http://mirrors.ludost.net/gentoo-portage/www-apache/mod_whatkilledus/files/gen_test_char.c
12# Source1-md5: 7c4e734d1afc695a5be53581998f3700
13BuildRequires: %{apxs}
14BuildRequires: apache-devel >= 2.0
c3404fb0
ER
15BuildRequires: rpmbuild(macros) >= 1.268
16Requires: apache(modules-api) = %apache_modules_api
070fd57c
AM
17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
c3404fb0
ER
19%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
20%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
9bb3fada 21%define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs
070fd57c
AM
22
23%description
9bb3fada
AM
24mod_whatkilledus is an experimental module for Apache httpd 2.x which
25tracks the current request and logs a report of the active request
26when a child process crashes. You should verify that it works
27reasonably on your system before putting it in production.
19cae75b 28
070fd57c
AM
29%prep
30%setup -q -c -T
9bb3fada 31install %{SOURCE0} .
070fd57c
AM
32
33%build
9bb3fada
AM
34%{__cc} `%{_bindir}/apr-1-config --includes --cppflags` %{SOURCE1} -o gen_test_char
35./gen_test_char > test_char.h
36%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
070fd57c
AM
37
38%install
39rm -rf $RPM_BUILD_ROOT
9bb3fada
AM
40install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,/var/log/httpd}
41install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
070fd57c 42
9bb3fada 43touch $RPM_BUILD_ROOT/var/log/httpd/whatkilledus_log
070fd57c 44
9bb3fada
AM
45cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf << 'EOF'
46LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
9bb3fada 47EnableExceptionHook On
0d364973 48WhatKilledUsLog /var/log/httpd/whatkilledus_log
9bb3fada 49EOF
070fd57c
AM
50
51%clean
52rm -rf $RPM_BUILD_ROOT
53
54%post
c3404fb0 55%service -q httpd restart
070fd57c 56
4a55a9b1 57%postun
070fd57c 58if [ "$1" = "0" ]; then
c3404fb0 59 %service -q httpd restart
070fd57c
AM
60fi
61
62%files
63%defattr(644,root,root,755)
9bb3fada 64%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
070fd57c 65%attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.042956 seconds and 4 git commands to generate.