]>
Commit | Line | Data |
---|---|---|
070fd57c AM |
1 | %define mod_name whatkilledus |
2 | %define apxs /usr/sbin/apxs | |
3 | Summary: Knows what a thread was handling in case the thread segfaults | |
4 | Name: apache-mod_%{mod_name} | |
5 | Version: 1.0 | |
6 | Release: 1 | |
7 | License: Apache | |
8 | Group: Networking/Daemons | |
9 | Source0: http://people.apache.org/~trawick/mod_whatkilledus.c | |
10 | # Source0-md5: e59c5d56e294a31e5b158ad5e4553001 | |
11 | URL: http://people.apache.org/~trawick/exception_hook.html | |
070fd57c | 12 | BuildRequires: apache-devel >= 2.0.43 |
c3404fb0 ER |
13 | BuildRequires: rpmbuild(macros) >= 1.268 |
14 | Requires: apache(modules-api) = %apache_modules_api | |
070fd57c AM |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
16 | ||
c3404fb0 ER |
17 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
18 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
070fd57c AM |
19 | |
20 | %description | |
21 | Keeps a little bit of state on each active connection, which allows it | |
22 | to know what a thread was handling in case the thread segfaults. | |
23 | ||
24 | %prep | |
25 | %setup -q -c -T | |
26 | ||
27 | %build | |
28 | %{apxs} -c %{SOURCE0} | |
29 | ||
30 | %install | |
31 | rm -rf $RPM_BUILD_ROOT | |
c3404fb0 | 32 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} |
070fd57c | 33 | |
c3404fb0 | 34 | libtool --mode=install install mod_%{mod_name}.la $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so |
070fd57c | 35 | |
c3404fb0 ER |
36 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' \ |
37 | > $RPM_BUILD_ROOT/etc/httpd/httpd.conf/68_mod_%{mod_name}.conf | |
070fd57c AM |
38 | |
39 | %clean | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | ||
42 | %post | |
c3404fb0 | 43 | %service -q httpd restart |
070fd57c AM |
44 | |
45 | %preun | |
46 | if [ "$1" = "0" ]; then | |
c3404fb0 | 47 | %service -q httpd restart |
070fd57c AM |
48 | fi |
49 | ||
50 | %files | |
51 | %defattr(644,root,root,755) | |
c3404fb0 | 52 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*mod_*.conf |
070fd57c | 53 | %attr(755,root,root) %{_pkglibdir}/*.so |