]> git.pld-linux.org Git - packages/apache-mod_xsendfile.git/blame - apache-mod_xsendfile.spec
- new
[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}
13BuildRequires: apache-devel >= 2.0.40
14BuildRequires: autoconf
15BuildRequires: automake
16BuildRequires: rpmbuild(macros) >= 1.268
17Requires: apache(modules-api) = %apache_modules_api
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
21%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
22%define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs
23
24%description
25mod_xsendfile is a small Apache2 module that processes X-SENDFILE
26headers registered by the original output handler. If it encounters
27the presence of such header it will discard all output and send the
28file specified by that header instead using Apache internals including
29all optimizations like caching-headers and sendfile or mmap if
30configured. It is useful for processing script-output of e.g. PHP,
31Perl or any CGI.
32
33%prep
34%setup -qc
35
36%build
37%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
38
39%install
40rm -rf $RPM_BUILD_ROOT
41install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
42
43install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
44echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
45 $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
46
47%clean
48rm -rf $RPM_BUILD_ROOT
49
50%post
51%service -q httpd restart
52
53%postun
54if [ "$1" = "0" ]; then
55 %service -q httpd restart
56fi
57
58%files
59%defattr(644,root,root,755)
60%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
61%attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.655906 seconds and 4 git commands to generate.