]> git.pld-linux.org Git - packages/apache-mod_proctitle.git/blob - apache-mod_proctitle.spec
- rel .2
[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.2
7 License:        Apache v2.0
8 Group:          Networking/Daemons/HTTP
9 Source0:        mod_proctitle.c
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)
17 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
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
32 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
33 install -p .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
34
35 cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf << 'EOF'
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)
52 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
53 %attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.105133 seconds and 4 git commands to generate.