]>
Commit | Line | Data |
---|---|---|
80490bcb ER |
1 | # NOTE |
2 | # - This project is RIP since Thu May 9 19:00:01 PDT 2002 | |
3 | # - and doesn't compile anyway | |
1685aee8 | 4 | %define mod_name snake |
8c265289 | 5 | %define apxs /usr/sbin/apxs1 |
1685aee8 | 6 | Summary: An Apache module to allow for Python plugins and control |
2b03efe2 | 7 | Summary(pl.UTF-8): Moduł do Apache pozwalający na kontrolę i wtyczki Pythona |
8c265289 | 8 | Name: apache1-mod_%{mod_name} |
1685aee8 | 9 | Version: 0.5.0 |
b4cdcd41 | 10 | Release: 1.3 |
1685aee8 AM |
11 | License: GPL |
12 | Group: Networking/Daemons | |
e9ba77eb | 13 | Source0: http://dl.sourceforge.net/mod%{mod_name}/mod_%{mod_name}-%{version}.tar.gz |
3f5c7979 | 14 | # Source0-md5: 7c043871a66a8579c6fec561c5d6cb84 |
8c265289 | 15 | Patch0: %{name}-dumb_acam.patch |
1685aee8 | 16 | URL: http://modsnake.sourceforge.net/ |
c25dae2d | 17 | BuildRequires: apache1-devel >= 1.3.39 |
1685aee8 | 18 | BuildRequires: python-devel >= 1.5 |
0d88f3bf | 19 | BuildRequires: rpmbuild(macros) >= 1.268 |
b4cdcd41 | 20 | Requires: apache1(EAPI) |
0d88f3bf | 21 | Obsoletes: apache-mod_snake <= 0.5.0 |
1685aee8 AM |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
80490bcb ER |
24 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
25 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
1685aee8 AM |
26 | |
27 | %description | |
28 | mod_snake is an Apache module which allows for execution of Python | |
29 | code directly within the Apache server process. By including an | |
30 | interpreter in the Apache process, Python CGIs are accelerated, Python | |
31 | can be embedded within HTML and Python written modules can control the | |
32 | internals of the webserver. | |
33 | ||
8609f9b1 JR |
34 | %description -l pl.UTF-8 |
35 | mod_snake to moduł Apache pozwalający na wykonywanie kodu Pythona | |
36 | bezpośrednio w procesie serwera Apache. Włączając interpreter do | |
37 | procesu Apache skrypty CGI w Pythonie są znacznie przyspieszone. | |
38 | Python może być umieszczany w HTML-u oraz moduły Pythona mogą | |
39 | kontrolować wewnętrzne sprawy serwera WWW. | |
1685aee8 | 40 | |
908a2fce | 41 | %prep |
1685aee8 | 42 | %setup -q -n mod_%{mod_name}-%{version} |
8c265289 | 43 | %patch0 -p0 |
1685aee8 AM |
44 | |
45 | %build | |
46 | %configure2_13 \ | |
0d38f36c | 47 | --with-apxs=%{apxs} \ |
1685aee8 AM |
48 | --enable-dso |
49 | %{__make} | |
50 | ||
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
80490bcb | 53 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
1685aee8 AM |
54 | |
55 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
56 | ||
80490bcb ER |
57 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
58 | $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf | |
59 | ||
1685aee8 AM |
60 | %clean |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %post | |
0d88f3bf | 64 | %service -q apache restart |
1685aee8 | 65 | |
c97d2a81 | 66 | %postun |
1685aee8 | 67 | if [ "$1" = "0" ]; then |
0d88f3bf | 68 | %service -q apache restart |
1685aee8 AM |
69 | fi |
70 | ||
71 | %files | |
72 | %defattr(644,root,root,755) | |
a2f940c3 | 73 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
1685aee8 | 74 | %attr(755,root,root) %{_pkglibdir}/* |