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