1 %define mod_name limitipconn
2 %define apxs %{_sbindir}/apxs1
3 Summary: Apache module: Limit simultaneous connections by an IP address
4 Name: apache1-mod_%{mod_name}
8 Group: Networking/Daemons
9 Source0: http://dominia.org/djao/limit/mod_limitipconn-%{version}.tar.gz
10 # Source0-md5: 009dac6ccae20806916ec7aa61a42a1f
12 URL: http://dominia.org/djao/limitipconn.html
13 BuildRequires: apache1-devel >= 1.3.33-2
14 BuildRequires: rpmbuild(macros) >= 1.228
15 Requires: apache1(EAPI)
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
19 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
22 The mod_limitipconn module lets you enforce limits on the number of
23 simultaneous downloads allowed from a single IP address. You can also
24 control which MIME types are affected by the limits.
26 This module will not function unless mod_status is loaded and the
27 "ExtendedStatus On" directive is set.
30 %setup -q -n mod_%{mod_name}-%{version}
33 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
38 install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
39 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
42 rm -rf $RPM_BUILD_ROOT
45 %service apache restart
48 if [ "$1" = "0" ]; then
49 %service -q apache restart
53 %defattr(644,root,root,755)
55 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
56 %attr(755,root,root) %{_pkglibdir}/*