]>
Commit | Line | Data |
---|---|---|
35d1673e ER |
1 | %define mod_name xsendfile |
2 | %define apxs /usr/sbin/apxs | |
4983f265 | 3 | Summary: Apache module: processing X-SENDFILE headers |
1e60d610 | 4 | Summary(pl.UTF-8): Moduł Apache'a przetwarzający nagłówki X-SENDFILE |
35d1673e | 5 | Name: apache-mod_%{mod_name} |
8b5da95b | 6 | Version: 0.12 |
4996560d | 7 | Release: 2 |
8b5da95b | 8 | License: Apache v2.0 |
e4dc1ae1 | 9 | Group: Networking/Daemons/HTTP |
8b5da95b ER |
10 | Source0: http://tn123.org/mod_xsendfile/mod_xsendfile-%{version}.tar.bz2 |
11 | # Source0-md5: 4b83b0e1a0c043c4e76ee99685c35110 | |
12 | URL: https://tn123.org/mod_xsendfile/ | |
ac78081b | 13 | BuildRequires: %{apxs} |
55faf3ef | 14 | BuildRequires: apache-devel >= 2.0 |
35d1673e ER |
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) | |
47c24550 | 20 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
35d1673e ER |
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 | ||
1717be06 JR |
31 | %description -l pl.UTF-8 |
32 | mod_xsendfile to mały moduł Apache'a 2 przetwarzający nagłówki | |
33 | X-SENDFILE zarejestrowane przez oryginalną procedurę obsługi wyjścia. | |
34 | Kiedy stwierdzi obecność takiego nagłówka, anuluje całe wyjście i | |
35 | zamiast niego wysyła plik wskazany przez ten nagłówek przy użyciu | |
36 | funkcji wewnętrznych Apache'a wraz ze wszystkimi optymalizacjami, | |
37 | takimi jak buforowanie nagłówków i sendfile/mmap. Moduł ten jest | |
38 | przydatny do przetwarzania wyjścia skryptów, np. PHP, Perla czy | |
4983f265 JB |
39 | dowolnego CGI. |
40 | ||
35d1673e | 41 | %prep |
86b0a969 | 42 | %setup -q -n mod_xsendfile-%{version} |
35d1673e ER |
43 | |
44 | %build | |
45 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
47c24550 ER |
49 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} |
50 | install -p .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
35d1673e | 51 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
47c24550 | 52 | $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf |
35d1673e ER |
53 | |
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %post | |
58 | %service -q httpd restart | |
59 | ||
60 | %postun | |
61 | if [ "$1" = "0" ]; then | |
62 | %service -q httpd restart | |
63 | fi | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
8b5da95b | 67 | %doc docs/Readme.html |
47c24550 | 68 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf |
35d1673e | 69 | %attr(755,root,root) %{_pkglibdir}/*.so |