]>
Commit | Line | Data |
---|---|---|
d63b6576 AM |
1 | %define mod_name proctitle |
2 | %define apxs /usr/sbin/apxs | |
3 | Summary: Apache module: set process name to currently serverd virtual host | |
4 | Name: apache-mod_%{mod_name} | |
5 | Version: 0.1 | |
1cee1df5 | 6 | Release: 0.20080707.2 |
d63b6576 | 7 | License: Apache v2.0 |
c65d608a | 8 | Group: Networking/Daemons/HTTP |
d63b6576 | 9 | Source0: mod_proctitle.c |
d63b6576 AM |
10 | BuildRequires: %{apxs} |
11 | BuildRequires: apache-devel >= 2.0 | |
12 | BuildRequires: rpmbuild(macros) >= 1.268 | |
13 | Requires: apache(modules-api) = %apache_modules_api | |
14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
15 | ||
16 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
5d018c58 | 17 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
d63b6576 AM |
18 | |
19 | %description | |
20 | mod_proctitle is an experimental module for Apache httpd 2.x which | |
21 | changes process name to currently served virtual host. | |
22 | ||
23 | %prep | |
24 | %setup -q -c -T | |
25 | install %{SOURCE0} . | |
26 | ||
27 | %build | |
28 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la | |
29 | ||
30 | %install | |
31 | rm -rf $RPM_BUILD_ROOT | |
5d018c58 ER |
32 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} |
33 | install -p .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
d63b6576 | 34 | |
5d018c58 | 35 | cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf << 'EOF' |
d63b6576 AM |
36 | LoadModule %{mod_name}_module modules/mod_%{mod_name}.so |
37 | EOF | |
38 | ||
39 | %clean | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | ||
42 | %post | |
43 | %service -q httpd restart | |
44 | ||
45 | %postun | |
46 | if [ "$1" = "0" ]; then | |
47 | %service -q httpd restart | |
48 | fi | |
49 | ||
50 | %files | |
51 | %defattr(644,root,root,755) | |
5d018c58 | 52 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf |
d63b6576 | 53 | %attr(755,root,root) %{_pkglibdir}/*.so |