2 # - This project is RIP since Thu May 9 19:00:01 PDT 2002
3 # - and doesn't compile anyway
5 %define apxs /usr/sbin/apxs1
6 Summary: An Apache module to allow for Python plugins and control
7 Summary(pl.UTF-8): Moduł do Apache pozwalający na kontrolę i wtyczki Pythona
8 Name: apache1-mod_%{mod_name}
12 Group: Networking/Daemons
13 Source0: http://dl.sourceforge.net/mod%{mod_name}/mod_%{mod_name}-%{version}.tar.gz
14 # Source0-md5: 7c043871a66a8579c6fec561c5d6cb84
15 Patch0: %{name}-dumb_acam.patch
16 URL: http://modsnake.sourceforge.net/
17 BuildRequires: %{apxs}
18 BuildRequires: apache1-devel >= 1.3.33-2
19 BuildRequires: python-devel >= 1.5
20 BuildRequires: rpmbuild(macros) >= 1.268
21 Requires: apache1 >= 1.3.33-2
22 Obsoletes: apache-mod_snake <= 0.5.0
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
26 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
29 mod_snake is an Apache module which allows for execution of Python
30 code directly within the Apache server process. By including an
31 interpreter in the Apache process, Python CGIs are accelerated, Python
32 can be embedded within HTML and Python written modules can control the
33 internals of the webserver.
35 %description -l pl.UTF-8
36 mod_snake to moduł Apache pozwalający na wykonywanie kodu Pythona
37 bezpośrednio w procesie serwera Apache. Włączając interpreter do
38 procesu Apache skrypty CGI w Pythonie są znacznie przyspieszone.
39 Python może być umieszczany w HTML-u oraz moduły Pythona mogą
40 kontrolować wewnętrzne sprawy serwera WWW.
43 %setup -q -n mod_%{mod_name}-%{version}
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
56 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
58 echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
59 $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
62 rm -rf $RPM_BUILD_ROOT
65 %service -q apache restart
68 if [ "$1" = "0" ]; then
69 %service -q apache restart
73 %defattr(644,root,root,755)
74 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
75 %attr(755,root,root) %{_pkglibdir}/*