1 %define mod_name limitipconn
2 %define apxs %{_sbindir}/apxs
3 Summary: Apache module: Limit simultaneous connections by an IP address
4 Name: apache-mod_%{mod_name}
8 Group: Networking/Daemons
9 Source0: http://dominia.org/djao/limit/mod_limitipconn-%{version}.tar.bz2
10 # Source0-md5: 5cf6ddc6743931afef26c03de851279b
12 URL: http://dominia.org/djao/limitipconn2.html
13 BuildRequires: %{apxs}
14 BuildRequires: apache-devel >= 2.0.0
15 BuildRequires: rpmbuild(macros) >= 1.228
16 Requires: apache(modules-api) = %apache_modules_api
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
20 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
23 The mod_limitipconn module lets you enforce limits on the number of
24 simultaneous downloads allowed from a single IP address. You can also
25 control which MIME types are affected by the limits.
27 This module will not function unless mod_status is loaded and the
28 "ExtendedStatus On" directive is set.
31 %setup -q -n mod_%{mod_name}-%{version}
34 %{apxs} -c mod_%{mod_name}.c
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
39 install -p .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
40 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
43 rm -rf $RPM_BUILD_ROOT
46 %service httpd restart
49 if [ "$1" = "0" ]; then
50 %service -q httpd restart
54 %defattr(644,root,root,755)
56 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
57 %attr(755,root,root) %{_pkglibdir}/*