]> git.pld-linux.org Git - packages/apache-mod_proctitle.git/blame - apache-mod_proctitle.spec
- HTTP group
[packages/apache-mod_proctitle.git] / apache-mod_proctitle.spec
CommitLineData
d63b6576
AM
1%define mod_name proctitle
2%define apxs /usr/sbin/apxs
3Summary: Apache module: set process name to currently serverd virtual host
4Name: apache-mod_%{mod_name}
5Version: 0.1
62ac6e3b 6Release: 0.20080707.1
d63b6576 7License: Apache v2.0
c65d608a 8Group: Networking/Daemons/HTTP
d63b6576
AM
9Source0: mod_proctitle.c
10# Source0-md5: e4974a4f7c7c7848eca8748c91c24062
11BuildRequires: %{apxs}
12BuildRequires: apache-devel >= 2.0
13BuildRequires: rpmbuild(macros) >= 1.268
14Requires: apache(modules-api) = %apache_modules_api
15BuildRoot: %{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
22mod_proctitle is an experimental module for Apache httpd 2.x which
23changes process name to currently served virtual host.
24
25%prep
26%setup -q -c -T
27install %{SOURCE0} .
28
29%build
30%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
31
32%install
33rm -rf $RPM_BUILD_ROOT
34install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,/var/log/httpd}
35install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
36
37cat > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf << 'EOF'
38LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
39EOF
40
41%clean
42rm -rf $RPM_BUILD_ROOT
43
44%post
45%service -q httpd restart
46
47%postun
48if [ "$1" = "0" ]; then
49 %service -q httpd restart
50fi
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.053193 seconds and 4 git commands to generate.