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