]> git.pld-linux.org Git - packages/apache-mod_backtrace.git/blame - apache-mod_backtrace.spec
- up to 2.01; use libunwind
[packages/apache-mod_backtrace.git] / apache-mod_backtrace.spec
CommitLineData
51910bc3
AM
1%define mod_name backtrace
2%define apxs /usr/sbin/apxs
3Summary: Apache module: collects backtraces on crashes
8a8039fa 4Summary(pl.UTF-8): Moduł Apache: zbiera informacje o awariach
51910bc3 5Name: apache-mod_%{mod_name}
2b6c54f3
AM
6Version: 2.01
7Release: 1
51910bc3 8License: Apache v2.0
e8779469 9Group: Networking/Daemons/HTTP
3c01aff1 10Source0: http://emptyhammock.com/downloads/wku_bt-%{version}.zip
2b6c54f3 11# Source0-md5: 32bbe148f6cb2b8714166388f94d9129
3c01aff1 12URL: http://emptyhammock.com/projects/httpd/diag/
51910bc3
AM
13BuildRequires: %{apxs}
14BuildRequires: apache-devel >= 2.0
2b6c54f3 15BuildRequires: libunwind-devel
51910bc3 16BuildRequires: rpmbuild(macros) >= 1.268
3c01aff1 17Requires: apache-mod_whatkilledus >= %{version}
51910bc3
AM
18Requires: apache(modules-api) = %apache_modules_api
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
8a8039fa 22%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
51910bc3
AM
23%define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs
24
25%description
26mod_backtrace is an experimental module for Apache httpd 2.x which
27collects backtraces when a child process crashes.
28
8a8039fa 29%description -l pl.UTF-8
30mod_backtrace jest eksperymentalnym modułem dla apache'a 2.x, który
31rejestruje informacje o błędach w sytuacji kiedy proces potomny
32serwera apache ulegnie zniszczeniu.
33
51910bc3 34%prep
3c01aff1 35%setup -q -n wku_bt-%{version}
51910bc3
AM
36
37%build
3c01aff1 38%{apxs} -c mod_%{mod_name}.c diag.c \
2b6c54f3 39 -DDIAG_HAVE_LIBUNWIND_BACKTRACE=1 \
3c01aff1 40%if "%{__lib}" == "lib64"
2b6c54f3 41 -DDIAG_BITS_64=1 \
3c01aff1 42%endif
2b6c54f3
AM
43 -lunwind \
44 -o mod_%{mod_name}.la
51910bc3
AM
45
46%install
47rm -rf $RPM_BUILD_ROOT
3c01aff1 48install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
51910bc3
AM
49install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
50
51910bc3 51
8a8039fa 52cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf << 'EOF'
51910bc3 53LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
0d47d335 54#BacktraceErrorLogging Off
51910bc3
AM
55EOF
56
57%clean
58rm -rf $RPM_BUILD_ROOT
59
51910bc3
AM
60%service -q httpd restart
61
62%postun
63if [ "$1" = "0" ]; then
64 %service -q httpd restart
65fi
66
3c01aff1
AM
67%triggerpostun -- %{name} < 2.00
68sed -i -e 's#^EnableExceptionHook.*##g' -e 's#BacktraceLog.*##g' %{_sysconfdir}/90_mod_%{mod_name}.conf
69
51910bc3
AM
70%files
71%defattr(644,root,root,755)
8a8039fa 72%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
51910bc3 73%attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.081427 seconds and 4 git commands to generate.