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: ftp://ftp.sourceforge.net/pub/sourceforge/mod%{mod_name}/mod_%{mod_name}-%{version}.tar.gz
11 URL: http://modsnake.sourceforge.net/
12 BuildRequires: %{apxs}
13 BuildRequires: apache-devel >= 1.3.15
14 BuildRequires: python-devel >= 1.5
15 Requires(post,preun): %{apxs}
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
22 mod_snake is an Apache module which allows for execution of Python
23 code directly within the Apache server process. By including an
24 interpreter in the Apache process, Python CGIs are accelerated, Python
25 can be embedded within HTML and Python written modules can control the
26 internals of the webserver.
29 mod_snake to modu³ Apache pozwalaj±cy na wykonywanie kodu Pythona
30 bezpo¶rednio w procesie serwera Apache. W³±czaj±c interpreter do
31 procesu Apache skrypty CGI w Pythonie s± znacznie przyspieszone.
32 Python mo¿e byæ umieszczany w HTMLu oraz modu³y Pythona mog±
33 kontrolowaæ wewnêtrzne sprawy serwera www.
36 %setup -q -n mod_%{mod_name}-%{version}
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT%{_pkglibdir}
48 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
51 rm -rf $RPM_BUILD_ROOT
54 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
55 if [ -f /var/lock/subsys/httpd ]; then
56 /etc/rc.d/init.d/httpd restart 1>&2
60 if [ "$1" = "0" ]; then
61 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
62 if [ -f /var/lock/subsys/httpd ]; then
63 /etc/rc.d/init.d/httpd restart 1>&2
68 %defattr(644,root,root,755)
69 %attr(755,root,root) %{_pkglibdir}/*