# # spec file for package apache2-mod_xsendfile # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?rhel} %global apache_apxs %{_httpd_apxs} %global apache_libexecdir %{_httpd_moddir} %endif %if 0%{?rhel} Name: mod_xsendfile %else Name: apache2-mod_xsendfile %endif Version: 0.12 Release: 3.38.uyuni3 Summary: Processes X-SENDFILE headers registered by the original output handler License: Apache-2.0 Group: Productivity/Networking/Web/Servers Url: https://tn123.org/mod_xsendfile/ Source: https://tn123.org/mod_xsendfile/mod_xsendfile-%{version}.tar.bz2 Source1: xsendfile.conf %if 0%{?rhel} BuildRequires: gcc BuildRequires: httpd-devel Requires: httpd Requires: httpd-mmn = %{_httpd_mmn} %else BuildRequires: apache-rpm-macros BuildRequires: apache2-devel BuildRequires: apache2-prefork BuildRequires: apache2-worker Requires: apache2 %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: mod_xsendfile = %{version} %description mod_xsendfile is a small Apache2 module that processes X-SENDFILE headers registered by the original output handler. If it encounters the presence of such header it will discard all output and send the file specified by that header instead using Apache internals including all optimizations like caching-headers and sendfile or mmap if configured. It is useful for processing script-output of e.g. php, perl or any cgi. %prep %setup -q -n mod_xsendfile-%{version} %build %{apache_apxs} -c mod_xsendfile.c %install rm -rf $%{buildroot} mkdir -p %{buildroot}/%{apache_libexecdir} cp -p .libs/mod_xsendfile.so %{buildroot}/%{apache_libexecdir} %if 0%{?rhel} mkdir -p %{buildroot}/%{_httpd_modconfdir} cp -p %SOURCE1 %{buildroot}/%{_httpd_modconfdir} %endif %check set +x # % apache_test_module_load -m xsendfile set -x %files %defattr(-,root,root) %{apache_libexecdir}/*.so %if 0%{?rhel} %config(noreplace) %{_httpd_modconfdir}/xsendfile.conf %endif %changelog * Mon Dec 14 2020 Stefan Bluhm - Modified to build on RHEL8. * Mon Sep 7 2015 pgajdos@suse.com - test module with %%apache_test_module_load * Thu Jul 16 2015 pgajdos@suse.com This will pull this module to the update (in released distribution) when apache maintainer thinks it is good (due api/abi changes). * Mon Nov 3 2014 pgajdos@suse.com - call spec-cleaner - use apache rpm macros * Mon Jun 6 2011 crrodriguez@opensuse.org - Initial package