]> git.pld-linux.org Git - packages/apache-mod_proctitle.git/blob - apache-mod_proctitle.spec
- comment fixed
[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
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)
19 %define         _pkglogdir      %(%{apxs} -q PREFIX 2>/dev/null)/logs
20
21 %description
22 mod_proctitle is an experimental module for Apache httpd 2.x which
23 changes process name to currently served virtual host.
24
25 %prep
26 %setup -q -c -T
27 install %{SOURCE0} .
28
29 %build
30 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
31
32 %install
33 rm -rf $RPM_BUILD_ROOT
34 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,/var/log/httpd}
35 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
36
37 cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf << 'EOF'
38 LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
39 EOF
40
41 %clean
42 rm -rf $RPM_BUILD_ROOT
43
44 %post
45 %service -q httpd restart
46
47 %postun
48 if [ "$1" = "0" ]; then
49         %service -q httpd restart
50 fi
51
52 %files
53 %defattr(644,root,root,755)
54 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
55 %attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.046009 seconds and 3 git commands to generate.