2 %define apxs /usr/sbin/apxs
3 Summary: An Apache module to allow for Python plugins and control
4 Summary(pl): Modu³ do Apache pozwalaj±cy na kontrolê i wtyczki Pythona
5 Name: apache-mod_%{mod_name}
9 Group: Networking/Daemons
10 Source0: http://dl.sourceforge.net/mod%{mod_name}/mod_%{mod_name}-%{version}.tar.gz
11 # Source0-md5: 7c043871a66a8579c6fec561c5d6cb84
12 URL: http://modsnake.sourceforge.net/
13 BuildRequires: %{apxs}
14 BuildRequires: apache-devel >= 1.3.15
15 BuildRequires: python-devel >= 1.5
16 Requires(post,preun): %{apxs}
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
23 mod_snake is an Apache module which allows for execution of Python
24 code directly within the Apache server process. By including an
25 interpreter in the Apache process, Python CGIs are accelerated, Python
26 can be embedded within HTML and Python written modules can control the
27 internals of the webserver.
30 mod_snake to modu³ Apache pozwalaj±cy na wykonywanie kodu Pythona
31 bezpo¶rednio w procesie serwera Apache. W³±czaj±c interpreter do
32 procesu Apache skrypty CGI w Pythonie s± znacznie przyspieszone.
33 Python mo¿e byæ umieszczany w HTML-u oraz modu³y Pythona mog±
34 kontrolowaæ wewnêtrzne sprawy serwera www.
37 %setup -q -n mod_%{mod_name}-%{version}
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT%{_pkglibdir}
49 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
52 rm -rf $RPM_BUILD_ROOT
55 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
56 if [ -f /var/lock/subsys/httpd ]; then
57 /etc/rc.d/init.d/httpd restart 1>&2
61 if [ "$1" = "0" ]; then
62 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
63 if [ -f /var/lock/subsys/httpd ]; then
64 /etc/rc.d/init.d/httpd restart 1>&2
69 %defattr(644,root,root,755)
70 %attr(755,root,root) %{_pkglibdir}/*