Summary(sv): En modul som implementerar bandvidd- och begäranbegränsningar i Apache
Name: apache1-mod_%{mod_name}
Version: 3.1.2
-Release: 1.2
+Release: 3
License: BSD-like
Group: Networking/Daemons
Source0: http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz
Patch0: apache1-mod_throttle-PLD-v6stuff.patch
URL: http://www.snert.com/Software/mod_throttle/
BuildRequires: %{apxs}
+#{?with_ipv6:BuildRequires: apache1(ipv6)-devel}
BuildRequires: apache1-devel >= 1.3.33-2
-%{?with_ipv6:BuildRequires: apache1(ipv6)-devel}
Requires(triggerpostun): %{apxs}
Requires: apache1 >= 1.3.33-2
-Obsoletes: apache-mod_%{mod_name} <= %{version}
+Obsoletes: apache-mod_%{mod_name} <= 3.1.2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
+%define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs
%description
This Apache module is intended to reduce the load on your server &
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,%{_pkglogdir}}
install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
sed -e 's/<!--#/<!--/g' index.shtml > mod_%{mod_name}.html
+> $RPM_BUILD_ROOT%{_pkglogdir}/mod_throttle.runtime
+
%clean
rm -rf $RPM_BUILD_ROOT
echo "Run \"/etc/rc.d/init.d/apache start\" to start apache HTTP daemon."
fi
-%preun
+%postun
if [ "$1" = "0" ]; then
if [ -f /var/lock/subsys/apache ]; then
/etc/rc.d/init.d/apache restart 1>&2
%files
%defattr(644,root,root,755)
%doc *.txt *.html
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
%attr(755,root,root) %{_pkglibdir}/*
+%attr(660,root,http) %ghost %{_pkglogdir}/*