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