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