From ae19f32d4513a8cc9fe4786ab9396835731d28a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 10 Feb 2005 01:49:12 +0000 Subject: [PATCH] - confdir enabled apache1 - added ipv6 bcond Changed files: apache1-mod_throttle.spec -> 1.30 --- apache1-mod_throttle.spec | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/apache1-mod_throttle.spec b/apache1-mod_throttle.spec index cd07f96..79f9a12 100644 --- a/apache1-mod_throttle.spec +++ b/apache1-mod_throttle.spec @@ -1,3 +1,5 @@ +%bcond_without ipv6 # disable IPv6 support + %define mod_name throttle %define apxs /usr/sbin/apxs1 Summary: Bandwidth & Request Throttling for Apache @@ -12,7 +14,7 @@ Summary(pt_BR): Descompress Summary(sv): En modul som implementerar bandvidd- och begäranbegränsningar i Apache Name: apache1-mod_%{mod_name} Version: 3.1.2 -Release: 1 +Release: 1.2 License: BSD-like Group: Networking/Daemons Source0: http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz @@ -20,13 +22,15 @@ 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} -BuildRequires: apache1-devel >= 1.3.1 -Requires(post,preun): %{apxs} -Requires: apache1 >= 1.3.1 +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} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _pkglibdir %(%{apxs} -q LIBEXECDIR) +%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) +%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) %description This Apache module is intended to reduce the load on your server & @@ -88,24 +92,26 @@ v %prep %setup -q -n mod_%{mod_name}-%{version} -%patch0 -p1 +%{?with_ipv6:%patch0 -p1} %build %{apxs} -o mod_%{mod_name}.so -c mod_%{mod_name}.c %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_pkglibdir} +install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} +echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ + $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf + sed -e 's/