File apache2-mod_rpaf.spec of Package apache2-mod_rpaf

#
# spec file for package apache2-mod_rpaf
#
# 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/
#


%define modname mod_rpaf
%define srcver  0.8.4-rc3
Name:           apache2-mod_rpaf
Version:        0.8.4~rc3
Release:        0
Summary:        Reverse proxy add forward module for Apache
License:        Apache-2.0
Group:          Productivity/Networking/Web/Servers
Url:            https://github.com/gnif/mod_rpaf
Source:         https://github.com/gnif/mod_rpaf/archive/v%{srcver}.tar.gz
BuildRequires:  apache2-devel
BuildRequires:  apache-rpm-macros
Requires:       %{apache_mmn}
Requires:       %{apache_suse_maintenance_mmn}
Requires:       apache2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
mod_rpaf changes the remote address of the client visible to other
Apache modules when two conditions are satisfied. First condition is
that the remote client is actually a proxy that is defined in
httpd.conf. Secondly if there is an incoming X-Forwarded-For header
and the proxy is in it's list of known proxies it takes the last IP
from the incoming X-Forwarded-For header and changes the remote
address of the client in the request structure. It also takes the
incoming X-Host header and updates the virtualhost settings
accordingly. For Apache2 mod_proxy it takes the X-Forwared-Host header
and updates the virtualhosts.

To load the module into Apache, add it to APACHE_MODULES in
%{_sysconfdir}/sysconfig/apache2.

%prep
%setup -q -n %{modname}-%{srcver}

%build
make %{?_smp_mflags}

%install
mkdir -p %{buildroot}/%{apache_libexecdir}
cp -p .libs/%{modname}.so %{buildroot}/%{apache_libexecdir}/%{modname}.so

%files
%defattr(-,root,root)
%{apache_libexecdir}/%{modname}.so

%changelog
openSUSE Build Service is sponsored by