Setting tag mod_python-3.3.1-1
[mod_python.git] / mod_python.spec
1 %global contentdir /var/www
2
3 %define name mod_python
4 %define version 3.3.1
5 %define taglevel 1
6
7 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
8
9 Summary: An embedded Python interpreter for the Apache HTTP Server
10 Name: %{name}
11 Version: %{version}
12 Release: %{release}
13 Source: http://www.apache.org/dist/httpd/modpython/%{name}-%{version}.tgz
14 Source1: python.conf
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
21
22 Packager: PlanetLab <devel@planet-lab.org>
23 Distribution: PlanetLab %{plrelease}
24
25 URL: http://www.modpython.org/
26 License: ASL 2.0
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
31
32 %description
33 Mod_python is a module that embeds the Python language interpreter within
34 the server, allowing Apache handlers to be written in Python.
35
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.
39
40 %prep
41 %setup -q
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
48
49 # Convert to utf-8
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 && \
53     mv $file.new $file
54 done
55
56 %build
57 %configure --with-apxs=%{_bindir}/apxs --with-max-locks=4
58 make %{?_smp_mflags} APXS_CFLAGS="-Wc,-fno-strict-aliasing"
59
60 %install
61 mkdir -p $RPM_BUILD_ROOT%{_libdir}/httpd/modules
62 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
63
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/
67
68 # Install the manual.
69 mkdir -p $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python
70 cp -a doc-html/* $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python/
71
72 %files
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*
79
80 %changelog
81 * Wed May 29 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - mod_python-3.3.1-1
82 - First buildable version - not tested
83
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