From 9fecf69eccc491e8051a6cd04b14ecefeb51d48b Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Apr 18 2012 14:48:00 +0000 Subject: restore compat with pre-2.4 httpd --- diff --git a/.gitignore b/.gitignore index 82dff90..8d38ec9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ mod_wsgi-3.2.tar.gz /mod_wsgi-3.3.tar.gz /mod_wsgi-?.? +/results_mod_wsgi/ +/clog diff --git a/mod_wsgi.spec b/mod_wsgi.spec index 448515b..08c8b4b 100644 --- a/mod_wsgi.spec +++ b/mod_wsgi.spec @@ -1,6 +1,8 @@ - %{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} %{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}} +%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} +# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 +%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} Name: mod_wsgi Version: 3.3 @@ -41,13 +43,17 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir} +%if "%{_httpd_modconfdir}" == "%{_httpd_confdir}" +# httpd <= 2.2.x +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/wsgi.conf +%else +# httpd >= 2.4.x install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-wsgi.conf - +%endif %clean rm -rf $RPM_BUILD_ROOT - %files %defattr(-,root,root,-) %doc LICENCE README