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