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