File apache2-mod_qos.spec of Package apache2-mod_qos

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


Name:           apache2-mod_qos
Version:        11.66
Release:        0
Summary:        Quality of Sevice Module for the Apache Web Server
License:        GPL-2.0
Group:          Productivity/Networking/Web/Servers
Url:            http://mod-qos.sourceforge.net/
Source:         http://downloads.sourceforge.net/project/mod-qos/mod_qos-%{version}.tar.gz
Patch1:         mod_qos-loggerThread.patch
BuildRequires:  apache2-devel
BuildRequires:  apache2-worker
BuildRequires:  apache-rpm-macros
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc
BuildRequires:  glibc-devel
BuildRequires:  apr-util-devel
BuildRequires:  apr-devel
BuildRequires:  libpng-devel
BuildRequires:  make
BuildRequires:  openldap2-devel
BuildRequires:  openssl-devel
BuildRequires:  pcre-devel
BuildRequires:  pkgconfig
Requires:       %{apache_mmn}
Requires:       %{apache_suse_maintenance_mmn}
Requires:       apache2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
mod_qos is a quality of service module for the Apache Web Server. It implements
control mechanisms that can provide different priority to different requests
and controls server access based on available resources.

mod_qos may be used to determine which requests should be served and which
shouldn't in order to avoid resource oversubscription. The module collects
different attributes such as the request URL, HTTP request and response
headers, the IP source address, the HTTP response code, history data (user
session and on per source IP address basis), the number of concurrent requests
to the server (total or requests having similar attributes), the number of
concurrent TCP connections (total or from a single source IP), and so forth.

%prep
%setup -q -n "mod_qos-%{version}"
%patch1
find . -type f -exec sed -i 's/\r$//' {} \;

%build
pushd apache2
%{apache_apxs} -c mod_qos.c
popd
pushd tools
autoreconf -fiv
%configure --bindir=%{_sbindir}
make
popd

%install
mkdir -p %{buildroot}/%{apache_libexecdir}
mkdir -p %{buildroot}/%{apache_localstatedir}/mod_qos
pushd apache2
install -m 755 .libs/mod_qos.so %{buildroot}/%{apache_libexecdir}
popd
pushd tools
make DESTDIR=%{buildroot} install
popd

%files
%defattr(-,root,root)
%{apache_libexecdir}/mod_qos.so
%{_sbindir}/*
%attr(0750,wwwrun,root) %{apache_localstatedir}/mod_qos
%doc README.TXT
%doc doc/*

%changelog

openSUSE Build Service is sponsored by