]> git.pld-linux.org Git - packages/apache-mod_xsendfile.git/blob - apache-mod_xsendfile.spec
738696523d53047aa691ac8450573e3963325132
[packages/apache-mod_xsendfile.git] / apache-mod_xsendfile.spec
1 %define         mod_name        xsendfile
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: convert character encoding of request URLs
4 Name:           apache-mod_%{mod_name}
5 Version:        0.8
6 Release:        0.1
7 License:        Apache 2.0
8 Group:          Networking/Daemons
9 Source0:        http://celebnamer.celebworld.ws/stuff/mod_xsendfile/mod_xsendfile-%{version}.tar.gz
10 # Source0-md5:  aa885ed32cce545404f329fdf507e53b
11 URL:            http://celebnamer.celebworld.ws/stuff/mod_xsendfile/
12 BuildRequires:  %{apxs}
13 BuildRequires:  apache-devel >= 2.0
14 BuildRequires:  rpmbuild(macros) >= 1.268
15 Requires:       apache(modules-api) = %apache_modules_api
16 BuildRoot:      %{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
23 mod_xsendfile is a small Apache2 module that processes X-SENDFILE
24 headers registered by the original output handler. If it encounters
25 the presence of such header it will discard all output and send the
26 file specified by that header instead using Apache internals including
27 all optimizations like caching-headers and sendfile or mmap if
28 configured. It is useful for processing script-output of e.g. PHP,
29 Perl 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
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
40
41 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
42 echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
43     $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
44
45 %clean
46 rm -rf $RPM_BUILD_ROOT
47
48 %post
49 %service -q httpd restart
50
51 %postun
52 if [ "$1" = "0" ]; then
53         %service -q httpd restart
54 fi
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.053368 seconds and 2 git commands to generate.