]> git.pld-linux.org Git - packages/apache-mod_xsendfile.git/blame - apache-mod_xsendfile.spec
- bogus deps dropped
[packages/apache-mod_xsendfile.git] / apache-mod_xsendfile.spec
CommitLineData
35d1673e
ER
1%define mod_name xsendfile
2%define apxs /usr/sbin/apxs
3Summary: Apache module: convert character encoding of request URLs
4Name: apache-mod_%{mod_name}
5Version: 0.8
6Release: 0.1
7License: Apache 2.0
8Group: Networking/Daemons
9Source0: http://celebnamer.celebworld.ws/stuff/mod_xsendfile/mod_xsendfile-%{version}.tar.gz
10# Source0-md5: aa885ed32cce545404f329fdf507e53b
11URL: http://celebnamer.celebworld.ws/stuff/mod_xsendfile/
12BuildRequires: %{apxs}
55faf3ef 13BuildRequires: apache-devel >= 2.0
35d1673e
ER
14BuildRequires: rpmbuild(macros) >= 1.268
15Requires: apache(modules-api) = %apache_modules_api
16BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
19%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
20%define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs
21
22%description
23mod_xsendfile is a small Apache2 module that processes X-SENDFILE
24headers registered by the original output handler. If it encounters
25the presence of such header it will discard all output and send the
26file specified by that header instead using Apache internals including
27all optimizations like caching-headers and sendfile or mmap if
28configured. It is useful for processing script-output of e.g. PHP,
29Perl or any CGI.
30
31%prep
32%setup -qc
33
34%build
35%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
36
37%install
38rm -rf $RPM_BUILD_ROOT
39install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
40
41install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
42echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
43 $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
44
45%clean
46rm -rf $RPM_BUILD_ROOT
47
48%post
49%service -q httpd restart
50
51%postun
52if [ "$1" = "0" ]; then
53 %service -q httpd restart
54fi
55
56%files
57%defattr(644,root,root,755)
58%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
59%attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.094479 seconds and 4 git commands to generate.