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