]> git.pld-linux.org Git - packages/apache-mod_python.git/blame_incremental - apache-mod_python.spec
- release 52 (by relup.sh)
[packages/apache-mod_python.git] / apache-mod_python.spec
... / ...
CommitLineData
1# TODO:
2# 1) make mod_python3 use it's own set of config directives
3# 2) test if both flavors can be loaded at the same time
4# 3) after 1 and 2 are done, drop conflicts
5#
6# Conditional build:
7%bcond_without python2 # CPython 2.x module
8%bcond_without python3 # CPython 3.x module
9
10%define mod_name python
11%define apxs /usr/sbin/apxs
12Summary: An embedded Python interpreter for the Apache Web server
13Summary(cs.UTF-8): Vestavěný interpret Pythonu pro WWW server Apache
14Summary(de.UTF-8): Ein eingebetteter Python-Interpreter für den Apache Web-Server
15Summary(es.UTF-8): Intérprete Python para el servidor Web Apache
16Summary(fr.UTF-8): Interpréteur Python intégré pour le serveur Web Apache
17Summary(it.UTF-8): Interprete Python integrato per il server Web Apache
18Summary(ja.UTF-8): Apache Web サーバー用の組込み Python インタープリタ
19Summary(pl.UTF-8): Wbudowany interpreter języka Python dla serwera WWW Apache
20Summary(sv.UTF-8): En inbyggd Python-interpretator för webbservern Apache
21Name: apache-mod_%{mod_name}
22Version: 3.5.0
23Release: 52
24License: Apache v2.0
25Group: Networking/Daemons/HTTP
26Source0: http://dist.modpython.org/dist/mod_%{mod_name}-%{version}.tgz
27# Source0-md5: 2e61621e8d030f535f112d8e739161e2
28Source1: %{name}.conf
29Source2: %{name}3.conf
30Patch0: %{name}-httpd-not-needed.patch
31Patch1: no-git.patch
32Patch2: set-request-response-status.patch
33Patch3: install.patch
34Patch4: import.patch
35Patch5: build.patch
36URL: http://modpython.org/
37BuildRequires: apache-devel >= 2.0.52-7
38BuildRequires: apr-devel >= 1:1.0.0
39BuildRequires: autoconf
40BuildRequires: automake
41BuildRequires: flex >= 2.5.31
42BuildRequires: rpm-pythonprov
43BuildRequires: rpmbuild(macros) >= 1.671
44%if %{with python2}
45BuildRequires: python
46BuildRequires: python-devel >= 1:2.6
47%endif
48%if %{with python3}
49BuildRequires: python3
50BuildRequires: python3-devel >= 1:3.3
51%endif
52Requires(post,preun,postun): systemd-units >= 38
53Requires: rc-scripts
54Requires: apache(modules-api) = %apache_modules_api
55Requires: apr >= 1:1.0.0
56# apache.py uses pdb module
57Requires: python-devel-tools
58%requires_eq python-libs
59Requires: systemd-units >= 38
60Conflicts: apache-mod_python3
61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63%define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
64%define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
65
66%description
67Mod_python is a module that embeds the Python language interpreter
68within the server, allowing Apache handlers to be written in Python.
69
70Mod_python brings together the versatility of Python and the power of
71the Apache Web server for a considerable boost in flexibility and
72performance over the traditional CGI approach.
73
74%description -l cs.UTF-8
75Balíček mod_python obsahuje modul, který umožní serveru Apache přímo
76interpretovat CGI skripty napsané v jazyce Python. To vede k výraznému
77zvýšení rychlosti jejich provedení.
78
79%description -l de.UTF-8
80Mod_python ist ein Modul, das den Python-Sprachinterpreter innerhalb
81des Servers einbettet und es den Apache-Handlern ermöglicht, in Python
82geschrieben zu werden.
83
84Mod_python verbindet die Vielseitigkeit von Python und die
85Leistungsstärke des Apache Web-Servers, was eine enorme Steigerung der
86Flexibilität und Leistung gegenüber dem traditionellen CGI-Ansatz
87bedeutet.
88
89%description -l es.UTF-8
90Mod_python es un módulo que activa el intérprete de Python en el
91servidor, permitiendo que se escriban gestores para Apache en Python.
92
93Mod_python proporciona la versatilidad y el poder del servidor web
94Apache para acelerar considerablemente la flexibilidad y prestaciones
95en comparación a una aproximación tradicional con CGI.
96
97%description -l fr.UTF-8
98Mod_python est un module qui intègre l'interpréteur de langage Python
99dans le serveur, permettant aux gestionnaires Apache d'être écrits en
100Python.
101
102Mod_python conjugue la versatilité de Python et la puissance du
103serveur Web Apache de façon à augmenter considérablement la
104flexibilité et la performance par rapport à une approche CGI
105traditionnelle.
106
107%description -l it.UTF-8
108Mod_python è un modulo che integra nel server l'interprete del
109linguaggio Python, in modo che i programmi di gestione possano essere
110scritti in Python.
111
112Mod_python unisce in sé la versatilità di Python e la potenza del
113server Web Apache, con un conseguente accrescimento di flessibilità e
114un miglioramento notevole nelle prestazioni rispetto all'approccio
115tradizionale CGI.
116
117%description -l ja.UTF-8
118Mod_python はサーバー内に Python
119言語インタープリタを組み込んだモジュール です。これにより、Apache
120ハンドラを Python で記述できます。 Mod_python は、Python の汎用性と
121Apache Web サーバーのパワーを組み合わせる ことにより、従来の CGI
122アプローチから柔軟性とパフォーマンスを大幅に向上させます。
123
124%description -l pl.UTF-8
125mod_python jest modułem osadzającym interpreter języka Python w
126serwerze WWW Apache, umożliwiając mu obsługę kodu napisanego w
127Pythonie.
128
129mod_python łączy wszechstronność Pythona i moc Apache'a jako serwera
130WWW, co daje zwiększoną elastyczność i zauważalną poprawę wydajności w
131stosunku do tradycyjnego rozwiązania opartego na CGI.
132
133%description -l sv.UTF-8
134Mod_python är en modul som bygger in en interpretator för språket
135Python i servern, och låter Apach-hanterare skrivas i Python.
136
137Mod_python sammanför mångsidigheten hos Python och kraften hos
138webbservern Apache till en avsevärd ökning av flexibiliteten och
139prestandan jämfört med den traditionella CGI-metoden.
140
141%package -n apache-mod_python3
142Summary: An embedded Python 3 interpreter for the Apache Web server
143Summary(cs.UTF-8): Vestavěný interpret Pythonu 3 pro WWW server Apache
144Summary(de.UTF-8): Ein eingebetteter Python3-Interpreter für den Apache Web-Server
145Summary(es.UTF-8): Intérprete Python 3 para el servidor Web Apache
146Summary(fr.UTF-8): Interpréteur Python 3 intégré pour le serveur Web Apache
147Summary(it.UTF-8): Interprete Python 3 integrato per il server Web Apache
148Summary(ja.UTF-8): Apache Web サーバー用の組込み Python 3 インタープリタ
149Summary(pl.UTF-8): Wbudowany interpreter języka Python 3 dla serwera WWW Apache
150Summary(sv.UTF-8): En inbyggd Python3-interpretator för webbservern Apache
151Group: Networking/Daemons/HTTP
152Requires(post,preun,postun): systemd-units >= 38
153Requires: rc-scripts
154Requires: apache(modules-api) = %apache_modules_api
155Requires: apr >= 1:1.0.0
156# apache.py uses pdb module
157Requires: python3-devel-tools
158%requires_eq python3-libs
159Requires: systemd-units >= 38
160Conflicts: apache-mod_python
161
162%description -n apache-mod_python3
163mod_python3 is a module that embeds the Python 3 language interpreter
164within the server, allowing Apache handlers to be written in Python 3.
165
166mod_python3 brings together the versatility of Python 3 and the power
167of the Apache Web server for a considerable boost in flexibility and
168performance over the traditional CGI approach.
169
170%description -n apache-mod_python3 -l cs.UTF-8
171Balíček mod_python3 obsahuje modul, který umožní serveru Apache přímo
172interpretovat CGI skripty napsané v jazyce Python 3. To vede k
173výraznému zvýšení rychlosti jejich provedení.
174
175%description -n apache-mod_python3 -l de.UTF-8
176mod_python3 ist ein Modul, das den Python3-Sprachinterpreter innerhalb
177des Servers einbettet und es den Apache-Handlern ermöglicht,
178in Python 3 geschrieben zu werden.
179
180mod_python3 verbindet die Vielseitigkeit von Python 3 und die
181Leistungsstärke des Apache Web-Servers, was eine enorme Steigerung der
182Flexibilität und Leistung gegenüber dem traditionellen CGI-Ansatz
183bedeutet.
184
185%description -n apache-mod_python3 -l es.UTF-8
186mod_python3 es un módulo que activa el intérprete de Python 3 en el
187servidor, permitiendo que se escriban gestores para Apache en
188Python 3.
189
190mod_python3 proporciona la versatilidad y el poder del servidor web
191Apache para acelerar considerablemente la flexibilidad y prestaciones
192en comparación a una aproximación tradicional con CGI.
193
194%description -n apache-mod_python3 -l fr.UTF-8
195mod_python3 est un module qui intègre l'interpréteur de langage
196Python 3 dans le serveur, permettant aux gestionnaires Apache d'être
197écrits en Python 3.
198
199mod_python3 conjugue la versatilité de Python 3 et la puissance du
200serveur Web Apache de façon à augmenter considérablement la
201flexibilité et la performance par rapport à une approche CGI
202traditionnelle.
203
204%description -n apache-mod_python3 -l it.UTF-8
205mod_python3 è un modulo che integra nel server l'interprete del
206linguaggio Python 3, in modo che i programmi di gestione possano
207essere scritti in Python 3.
208
209mod_python3 unisce in sé la versatilità di Python 3 e la potenza del
210server Web Apache, con un conseguente accrescimento di flessibilità e
211un miglioramento notevole nelle prestazioni rispetto all'approccio
212tradizionale CGI.
213
214%description -n apache-mod_python3 -l ja.UTF-8
215mod_python3 はサーバー内に Python 3
216言語インタープリタを組み込んだモジュール です。これにより、Apache
217ハンドラを Python 3 で記述できます。 mod_python3 は、Python 3
218の汎用性と Apache Web サーバーのパワーを組み合わせる ことにより、
219従来の CGI アプローチから柔軟性とパフォーマンスを大幅に向上させます。
220
221%description -n apache-mod_python3 -l pl.UTF-8
222mod_python3 jest modułem osadzającym interpreter języka Python 3 w
223serwerze WWW Apache, umożliwiając mu obsługę kodu napisanego w
224Pythonie 3.
225
226mod_python3 łączy wszechstronność Pythona 3 i moc Apache'a jako
227serwera WWW, co daje zwiększoną elastyczność i zauważalną poprawę
228wydajności w stosunku do tradycyjnego rozwiązania opartego na CGI.
229
230%description -n apache-mod_python3 -l sv.UTF-8
231mod_python3 är en modul som bygger in en interpretator för språket
232Python 3 i servern, och låter Apach-hanterare skrivas i Python 3.
233
234mod_python3 sammanför mångsidigheten hos Python 3 och kraften hos
235webbservern Apache till en avsevärd ökning av flexibiliteten och
236prestandan jämfört med den traditionella CGI-metoden.
237
238%prep
239%setup -q -n mod_%{mod_name}-%{version}
240%patch0 -p1
241%patch1 -p1
242%patch2 -p1
243%patch3 -p1
244%patch4 -p1
245%patch5 -p1
246
247%build
248%{__aclocal}
249%{__autoconf}
250
251%if %{with python2}
252%configure \
253 --with-apxs=%{apxs} \
254 --with-python=%{__python}
255
256%{__make} clean
257%{__make} dso
258install -d apache-mod_python{%{apachelibdir},%{apacheconfdir},%{_bindir}}
259%{__make} install \
260 DESTDIR=`pwd`/apache-mod_python \
261 PY_SITESCRIPTDIR=%{py_sitescriptdir} \
262 PY_SITEDIR=%{py_sitedir}
263%endif
264
265%if %{with python3}
266%configure \
267 --with-apxs=%{apxs} \
268 --with-python=%{__python3}
269
270%{__make} clean
271%{__make} dso
272install -d apache-mod_python3{%{apachelibdir},%{apacheconfdir},%{_bindir}}
273%{__make} install \
274 DESTDIR=`pwd`/apache-mod_python3 \
275 PY_SITESCRIPTDIR=%{py3_sitescriptdir} \
276 PY_SITEDIR=%{py3_sitedir}
277%{__mv} apache-mod_python3%{_bindir}/mod_python{,3}
278%{__mv} apache-mod_python3%{apachelibdir}/mod_python{,3}.so
279%endif
280
281%install
282rm -rf $RPM_BUILD_ROOT
283install -d $RPM_BUILD_ROOT{%{apachelibdir},%{apacheconfdir},%{_bindir}}
284
285%if %{with python2}
286cp -a apache-mod_python/* $RPM_BUILD_ROOT
287install %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/60_mod_python.conf
288%endif
289
290%if %{with python3}
291cp -a apache-mod_python3/* $RPM_BUILD_ROOT
292install %{SOURCE2} $RPM_BUILD_ROOT%{apacheconfdir}/60_mod_python3.conf
293%endif
294
295%py_postclean
296
297%clean
298rm -rf $RPM_BUILD_ROOT
299
300%post
301%service -q httpd restart
302%systemd_service_restart httpd.service
303
304%postun
305if [ "$1" = "0" ]; then
306 %service -q httpd restart
307 %systemd_service_restart httpd.service
308fi
309
310%post -n apache-mod_python3
311%service -q httpd restart
312%systemd_service_restart httpd.service
313
314%postun -n apache-mod_python3
315if [ "$1" = "0" ]; then
316 %service -q httpd restart
317 %systemd_service_restart httpd.service
318fi
319
320%if %{with python2}
321%files
322%defattr(644,root,root,755)
323%doc doc-html/* README.md COPYRIGHT NEWS CREDITS
324%doc examples
325%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_%{mod_name}.conf
326%attr(755,root,root) %{_bindir}/mod_python
327%attr(755,root,root) %{apachelibdir}/mod_python.so
328%dir %{py_sitedir}/mod_%{mod_name}
329%{py_sitedir}/mod_%{mod_name}-*.egg-info
330%attr(755,root,root) %{py_sitedir}/mod_%{mod_name}/*.so
331%{py_sitedir}/mod_%{mod_name}/*.py[co]
332%endif
333
334%if %{with python3}
335%files -n apache-mod_python3
336%defattr(644,root,root,755)
337%doc doc-html/* README.md COPYRIGHT NEWS CREDITS
338%doc examples
339%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_%{mod_name}3.conf
340%attr(755,root,root) %{_bindir}/mod_python3
341%attr(755,root,root) %{apachelibdir}/mod_python3.so
342%dir %{py3_sitedir}/mod_%{mod_name}
343%{py3_sitedir}/mod_%{mod_name}-*.egg-info
344%attr(755,root,root) %{py3_sitedir}/mod_%{mod_name}/*.so
345%{py3_sitedir}/mod_%{mod_name}/__pycache__
346%{py3_sitedir}/mod_%{mod_name}/*.py
347%endif
This page took 0.033657 seconds and 4 git commands to generate.