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
21 Packager: PlanetLab <devel@planet-lab.org>
22 Distribution: PlanetLab %{plrelease}
24 URL: http://www.modpython.org/
26 Group: System Environment/Daemons
27 BuildRequires: httpd-devel >= 2.0.40-6, python-devel
28 Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing)
29 Requires: httpd >= 2.0.40
32 Mod_python is a module that embeds the Python language interpreter within
33 the server, allowing Apache handlers to be written in Python.
35 Mod_python brings together the versatility of Python and the power of
36 the Apache Web server for a considerable boost in flexibility and
37 performance over the traditional CGI approach.
41 %patch1 -p1 -b .ldflags
42 %patch2 -p1 -b .cflags
43 %patch3 -p1 -b .buckets
44 %patch4 -p1 -b .capsule
45 %patch5 -p1 -b .no-user-site-directory
48 for file in CREDITS NEWS; do
49 iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
50 touch -r $file $file.new && \
55 %configure --with-apxs=%{_sbindir}/apxs --with-max-locks=4
56 make %{?_smp_mflags} APXS_CFLAGS="-Wc,-fno-strict-aliasing"
59 mkdir -p $RPM_BUILD_ROOT%{_libdir}/httpd/modules
60 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
62 # Install the config file
63 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
64 install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
67 mkdir -p $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python
68 cp -a doc-html/* $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python/
71 %defattr(-,root,root,-)
72 %doc README NEWS CREDITS LICENSE NOTICE
73 %{contentdir}/manual/mod/mod_python
74 %{_libdir}/httpd/modules/mod_python.so
75 %config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
76 %{python_sitearch}/mod_python*
79 * Sun May 26 2013 Thierry Parmentelat <thierry.parmentelat@inria.fr>
80 - reinstate for fedora18
81 - fresh start from mod_python-3.3.1-16.fc16.src.rpm