]> git.pld-linux.org Git - packages/apache-mod_wsgi.git/blame - apache-mod_wsgi.spec
Release 4. Rebuild to silence apache warnings about build/runtime python versions.
[packages/apache-mod_wsgi.git] / apache-mod_wsgi.spec
CommitLineData
cd06f811
ER
1# TODO:
2# - build py2 and py3 variants both?
3
277dec43 4#
cd06f811
ER
5# Conditional build:
6%bcond_with python3 # use CPython 3.x
7
c1cb356c
PZ
8%define mod_name wsgi
9%define apxs /usr/sbin/apxs
10Summary: WSGI interface for the Apache Web server
11Summary(pl.UTF-8): Interfejs WSGI dla serwera WWW Apache
12Name: apache-mod_%{mod_name}
cd06f811 13Version: 3.4
21e75ee0 14Release: 4
e606faaa 15License: Apache
c1cb356c
PZ
16Group: Networking/Daemons
17Source0: http://modwsgi.googlecode.com/files/mod_%{mod_name}-%{version}.tar.gz
cd06f811 18# Source0-md5: f42d69190ea0c337ef259cbe8d94d985
c1cb356c
PZ
19Source1: %{name}.conf
20URL: http://code.google.com/p/modwsgi/
dc5b014c 21BuildRequires: %{apxs}
c1cb356c
PZ
22BuildRequires: apache-devel >= 2.0.52-7
23BuildRequires: apr-devel >= 1:1.0.0
24BuildRequires: autoconf
25BuildRequires: automake
277dec43
AF
26%if %{with python3}
27BuildRequires: python3-devel
28%else
c1cb356c 29BuildRequires: python-devel >= 2.3
277dec43 30%endif
c1cb356c 31BuildRequires: rpmbuild(macros) >= 1.268
cd06f811 32Requires: apache(modules-api) = %{apache_modules_api}
c1cb356c 33Requires: apr >= 1:1.0.0
7d47fcb6
ER
34# http://helpful.knobs-dials.com/index.php/Mod_wsgi_notes#PyEval_AcquireThread:_non-NULL_old_thread_state
35Conflicts: apache-mod_python
c1cb356c
PZ
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
198257be
ER
38%define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
39%define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
c1cb356c
PZ
40
41%description
42The mod_wsgi adapter is an Apache module that provides a WSGI
43compliant interface for hosting Python based web applications within
44Apache. The adapter is written completely in C code against the Apache
45C runtime and for hosting WSGI applications within Apache has a lower
46overhead than using existing WSGI adapters for mod_python or CGI.
47
48%description -l pl.UTF-8
db2bc9ef 49Adapter mod_wsgi jest modułem udostępniającym interfejs WSGI dla
c1cb356c 50aplikacji WWW napisanych w języku Python i osadzonych w serwerze
db2bc9ef
JB
51Apache. Adapter jest w całości napisany w języku C w oparciu o
52bibliotekę uruchomieniową Apache i ma mniejsze wymagania niż w
53przypadku używania istniejących adapterów WSGI dla modułu mod_python
54lub CGI.
c1cb356c
PZ
55
56%prep
57%setup -q -n mod_%{mod_name}-%{version}
58
59%build
60%{__aclocal}
61%{__autoconf}
277dec43
AF
62%if %{with python3}
63PYTHONBIN=%{__python3}
64%else
65PYTHONBIN=%{__python}
66%endif
c1cb356c 67%configure \
277dec43
AF
68 --with-apxs=%{apxs} \
69 --with-python=$PYTHONBIN
c1cb356c
PZ
70
71%install
72rm -rf $RPM_BUILD_ROOT
198257be 73install -d $RPM_BUILD_ROOT{%{apachelibdir},%{apacheconfdir}}
c1cb356c
PZ
74%{__make} install \
75 DESTDIR=$RPM_BUILD_ROOT
76
cd06f811 77cp -p %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/61_mod_wsgi.conf
c1cb356c
PZ
78
79%clean
80rm -rf $RPM_BUILD_ROOT
81
82%post
83%service -q httpd restart
84
85%postun
86if [ "$1" = "0" ]; then
87 %service -q httpd restart
88fi
89
90%files
91%defattr(644,root,root,755)
92%doc README
198257be
ER
93%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_%{mod_name}.conf
94%attr(755,root,root) %{apachelibdir}/*.so
This page took 0.123048 seconds and 4 git commands to generate.