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