1 %global contentdir /var/www
3 %define name mod_python
7 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
9 Summary: An embedded Python interpreter for the Apache HTTP Server
13 Source: http://www.apache.org/dist/httpd/modpython/%{name}-%{version}.tgz
15 Patch1: mod_python-3.1.3-ldflags.patch
16 Patch2: mod_python-3.1.4-cflags.patch
17 Patch3: mod_python-3.3.1-buckets.patch
18 Patch4: mod_python-3.3.1-pycapsule.patch
19 Patch5: mod_python-3.3.1-no-user-site-directory.patch
20 Patch6: mod_python-3.3.1-apache24.patch
22 Packager: PlanetLab <devel@planet-lab.org>
23 Distribution: PlanetLab %{plrelease}
25 URL: http://www.modpython.org/
27 Group: System Environment/Daemons
28 BuildRequires: httpd-devel >= 2.0.40-6, python-devel
29 Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing)
30 Requires: httpd >= 2.0.40
33 Mod_python is a module that embeds the Python language interpreter within
34 the server, allowing Apache handlers to be written in Python.
36 Mod_python brings together the versatility of Python and the power of
37 the Apache Web server for a considerable boost in flexibility and
38 performance over the traditional CGI approach.
42 %patch1 -p1 -b .ldflags
43 %patch2 -p1 -b .cflags
44 %patch3 -p1 -b .buckets
45 %patch4 -p1 -b .capsule
46 %patch5 -p1 -b .no-user-site-directory
47 %patch6 -p1 -b .apache24
50 for file in CREDITS NEWS; do
51 iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
52 touch -r $file $file.new && \
57 %configure --with-apxs=%{_bindir}/apxs --with-max-locks=4
58 make %{?_smp_mflags} APXS_CFLAGS="-Wc,-fno-strict-aliasing"
61 mkdir -p $RPM_BUILD_ROOT%{_libdir}/httpd/modules
62 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
64 # Install the config file
65 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
66 install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
69 mkdir -p $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python
70 cp -a doc-html/* $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python/
73 %defattr(-,root,root,-)
74 %doc README NEWS CREDITS LICENSE NOTICE
75 %{contentdir}/manual/mod/mod_python
76 %{_libdir}/httpd/modules/mod_python.so
77 %config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
78 %{python_sitearch}/mod_python*
81 * Wed May 29 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - mod_python-3.3.1-1
82 - First buildable version - not tested
84 * Sun May 26 2013 Thierry Parmentelat <thierry.parmentelat@inria.fr>
85 - reinstate for fedora18
86 - fresh start from mod_python-3.3.1-16.fc16.src.rpm