[mod_wsgi] restore compat with pre-2.4 httpd

jorton jorton at fedoraproject.org
Wed Apr 18 14:48:11 UTC 2012


commit 9fecf69eccc491e8051a6cd04b14ecefeb51d48b
Author: Joe Orton <jorton at redhat.com>
Date:   Wed Apr 18 15:48:00 2012 +0100

    restore compat with pre-2.4 httpd

 .gitignore    |    2 ++
 mod_wsgi.spec |   12 +++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
---
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


More information about the scm-commits mailing list