]> git.pld-linux.org Git - packages/apache-mod_xsendfile.git/blob - apache-mod_xsendfile.spec
59283aa551098112f8bcfb34c0f1c3f77141b7c3
[packages/apache-mod_xsendfile.git] / apache-mod_xsendfile.spec
1 %define         mod_name        xsendfile
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: processing X-SENDFILE headers
4 Summary(pl.UTF-8):   Moduł Apache'a przetwarzający nagłówki X-SENDFILE
5 Name:           apache-mod_%{mod_name}
6 Version:        0.8
7 Release:        0.1
8 License:        Apache 2.0
9 Group:          Networking/Daemons
10 Source0:        http://celebnamer.celebworld.ws/stuff/mod_xsendfile/mod_xsendfile-%{version}.tar.gz
11 # Source0-md5:  aa885ed32cce545404f329fdf507e53b
12 URL:            http://celebnamer.celebworld.ws/stuff/mod_xsendfile/
13 BuildRequires:  %{apxs}
14 BuildRequires:  apache-devel >= 2.0
15 BuildRequires:  rpmbuild(macros) >= 1.268
16 Requires:       apache(modules-api) = %apache_modules_api
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
20 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
21 %define         _pkglogdir      %(%{apxs} -q PREFIX 2>/dev/null)/logs
22
23 %description
24 mod_xsendfile is a small Apache2 module that processes X-SENDFILE
25 headers registered by the original output handler. If it encounters
26 the presence of such header it will discard all output and send the
27 file specified by that header instead using Apache internals including
28 all optimizations like caching-headers and sendfile or mmap if
29 configured. It is useful for processing script-output of e.g. PHP,
30 Perl or any CGI.
31
32 %description -l pl.UTF-8
33 mod_xsendfile to mały moduł Apache'a 2 przetwarzający nagłówki
34 X-SENDFILE zarejestrowane przez oryginalną procedurę obsługi wyjścia.
35 Kiedy stwierdzi obecność takiego nagłówka, anuluje całe wyjście i
36 zamiast niego wysyła plik wskazany przez ten nagłówek przy użyciu
37 funkcji wewnętrznych Apache'a wraz ze wszystkimi optymalizacjami,
38 takimi jak buforowanie nagłówków i sendfile/mmap. Moduł ten jest
39 przydatny do przetwarzania wyjścia skryptów, np. PHP, Perla czy
40 dowolnego CGI.
41
42 %prep
43 %setup -qc
44
45 %build
46 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
51
52 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
53 echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
54     $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
55
56 %clean
57 rm -rf $RPM_BUILD_ROOT
58
59 %post
60 %service -q httpd restart
61
62 %postun
63 if [ "$1" = "0" ]; then
64         %service -q httpd restart
65 fi
66
67 %files
68 %defattr(644,root,root,755)
69 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
70 %attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.054323 seconds and 2 git commands to generate.