Browse files

add files for building an rpm, based on the mod_wsgi rpm

  • Loading branch information...
1 parent 6ce4445 commit 68ee3328b61530eb579f9852664dccbb522f8605 @djzort djzort committed Aug 17, 2012
Showing with 65 additions and 0 deletions.
  1. +64 −0 mod_psgi.spec
  2. +1 −0 psgi.conf
64 mod_psgi.spec
@@ -0,0 +1,64 @@
+%{!?_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_psgi
+Version: 3.3
+Release: 7%{?dist}
+Summary: A PSGI interface for Plack/Perl web applications in Apache
+Group: System Environment/Libraries
+License: ASL 2.0
+Source1: psgi.conf
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: httpd-devel
+BuildRequires: perl-devel
+Requires: httpd-mmn = %{_httpd_mmn}
+The mod_psgi adapter is an Apache module that provides a PSGI compliant
+interface for hosting Perl based web applications within Apache. The
+adapter is written completely in C code against the Apache C runtime and
+for hosting PSGI applications within Apache has a lower overhead than using
+existing PSGI adapters for mod_perl or CGI.
+%setup -q
+%configure --enable-shared --with-apxs=%{_httpd_apxs}
+make LDFLAGS="-L%{_libdir}" %{?_smp_mflags}
+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}/psgi.conf
+# httpd >= 2.4.x
+install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-psgi.conf
+%config(noreplace) %{_httpd_modconfdir}/*.conf
+* Fri Aug 18 2012 Dean Hamstead <>
+- Botch together the .spec file from the mod_wsgi spec file in fc18
1 psgi.conf
@@ -0,0 +1 @@
+LoadModule psgi_module modules/

0 comments on commit 68ee332

Please sign in to comment.