X-Git-Url: http://git.pld-linux.org/?p=packages%2Fapache1-mod_rpaf.git;a=blobdiff_plain;f=apache1-mod_rpaf.spec;h=c1bf32f1112617cb87e57bab3b339d55ee9c64bf;hp=85d568f620caee452558907256fddf4dfe9c7b95;hb=e01eb591403cdb98440846a709b7ee99989b6bad;hpb=28cfe932bc6d0a992cf870264410ed4c18af11e9 diff --git a/apache1-mod_rpaf.spec b/apache1-mod_rpaf.spec index 85d568f..c1bf32f 100644 --- a/apache1-mod_rpaf.spec +++ b/apache1-mod_rpaf.spec @@ -1,24 +1,27 @@ -# TODO -# - compile fails when apache1 is compiled with ipv6 - -%bcond_with ipv6 # disable IPv6 support - +# +# Conditional build: +%bcond_without ipv6 # disable IPv6 support +# %define mod_name rpaf %define apxs %{_sbindir}/apxs1 Summary: Reverse proxy add forward module for Apache Summary(pl): Modu³ Apache'a dodaj±cy przekazywanie dla odwrotnych proxy Name: apache1-mod_%{mod_name} Version: 0.5 -Release: 0.14 +Release: 2 License: Apache Group: Networking/Daemons Source0: http://stderr.net/apache/rpaf/download/mod_%{mod_name}-%{version}.tar.gz # Source0-md5: 471fb059d6223a394f319b7c8ab45c4d Source1: %{name}.conf +Patch0: %{name}-ipv6.patch URL: http://stderr.net/apache/rpaf/ -BuildRequires: apache1-devel >= 1.3.33-2 +%{?with_ipv6:BuildRequires: apache1(ipv6)-devel} %{!?with_ipv6:BuildConflicts: apache1(ipv6)-devel} +BuildRequires: apache1-devel >= 1.3.33-2 +BuildRequires: rpmbuild(macros) >= 1.268 Requires: apache1 >= 1.3.33-2 +%{!?with_ipv6:Conflicts: apache1(ipv6)} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) @@ -45,6 +48,7 @@ od wersji 1.3.25. %prep %setup -q -n mod_%{mod_name}-%{version} +%{?with_ipv6:%patch0 -p1} %build %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so @@ -60,15 +64,11 @@ install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/99_mod_%{mod_name}.conf rm -rf $RPM_BUILD_ROOT %post -if [ -f /var/lock/subsys/apache ]; then - /etc/rc.d/init.d/apache restart 1>&2 -fi +%service -q apache restart %postun if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/apache ]; then - /etc/rc.d/init.d/apache restart 1>&2 - fi + %service -q apache restart fi %files