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