2 # - there is also support for apache1 in scgi-1.2.tar.gz
3 # - there is cgi2scgi.c (CGI script that forwards requests to a SCGI server)
4 # which may be compiled and instaled in cgi-bin
5 # - python-scgi not tested; apache-mod_scgi works for me
8 %bcond_without apache # don't build the apache module
10 %define apxs /usr/sbin/apxs
11 Summary: SCGI - a replacement for the Common Gateway Interface (CGI)
12 Summary(pl.UTF-8): SCGI - zastępnik dla Common Gateway Interface (CGI)
16 License: CNRI Open Source License/MIT
17 Group: Networking/Daemons
18 Source0: http://python.ca/scgi/releases/%{name}-%{version}.tar.gz
19 # Source0-md5: 73d942a9ecdf4f20c8234e72ea82c7ee
20 Source1: apache-mod_%{name}.conf
21 URL: http://python.ca/scgi/
23 BuildRequires: %{apxs}
24 BuildRequires: apache-devel >= 2.0
26 BuildRequires: python-devel >= 1:2.5
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.268
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
32 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
35 The SCGI protocol is a replacement for the Common Gateway Interface
36 (CGI) protocol. It is a standard for applications to interface with
37 HTTP servers. It is similar to FastCGI but is designed to be easier to
40 %description -l pl.UTF-8
41 Protokół SCGI może być używany zamiast protokołu Common Gateway
42 Interface (CGI). Jest standardem komunikacji miedzy aplikacją a
43 serwerem HTTP. Jest podobny do FastCGI ale zaprojektowany tak, by być
44 prostszym do zaimplementowania.
46 %package -n apache-mod_scgi
47 Summary: SCGI - a replacement for the Common Gateway Interface (CGI)
48 Summary(pl.UTF-8): SCGI - zastępnik dla Common Gateway Interface (CGI)
49 Group: Networking/Daemons
50 Requires: apache(modules-api) = %apache_modules_api
51 %pyrequires_eq python-modules
53 %description -n apache-mod_scgi
54 The SCGI protocol is a replacement for the Common Gateway Interface
55 (CGI) protocol. It is a standard for applications to interface with
56 HTTP servers. It is similar to FastCGI but is designed to be easier to
59 In this package you can find an Apache module named mod_scgi that
60 implements the client side of the protocol.
62 %description -n apache-mod_scgi -l pl.UTF-8
63 Protokół SCGI może być używany zamiast protokołu Common Gateway
64 Interface (CGI). Jest standardem komunikacji miedzy aplikacją a
65 serwerem HTTP. Jest podobny do FastCGI ale zaprojektowany tak, by być
66 prostszym do zaimplementowania.
68 W tym pakiecie można znaleźć moduł dla serwera Apache nazwany
69 mod_scgi, który implementuje klienta protokołu SCGI.
71 %package -n python-scgi
72 Summary: A Python package that implements the server side of the SCGI protocol
73 Summary(pl.UTF-8): Moduł Pythona implementujący serwer protokołu SCGI
74 Group: Libraries/Python
75 %pyrequires_eq python-modules
77 %description -n python-scgi
78 The SCGI protocol is a replacement for the Common Gateway Interface
79 (CGI) protocol. It is a standard for applications to interface with
80 HTTP servers. It is similar to FastCGI but is designed to be easier to
83 In this package you can find a Python package named scgi that
84 implements the server side of the protocol.
86 %description -n python-scgi -l pl.UTF-8
87 Protokół SCGI może być używany zamiast protokołu Common Gateway
88 Interface (CGI). Jest standardem komunikacji miedzy aplikacją a
89 serwerem HTTP. Jest podobny do FastCGI ale zaprojektowany tak, by być
90 prostszym do zaimplementowania.
92 W tym pakiecie można znaleźć moduł Pythona implementujący serwer
101 %{apxs} -c mod_scgi.c
104 env CFLAGS="%{rpmcflags}" %{__python} setup.py build
107 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
110 install apache2/.libs/mod_scgi.so $RPM_BUILD_ROOT%{_pkglibdir}
111 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/60_mod_scgi.conf
114 %{__python} setup.py install \
115 --root=$RPM_BUILD_ROOT \
121 rm -rf $RPM_BUILD_ROOT
123 %post -n apache-mod_scgi
124 %service httpd restart
126 %preun -n apache-mod_scgi
127 if [ "$1" = "0" ]; then
128 %service httpd restart
132 %files -n apache-mod_scgi
133 %defattr(644,root,root,755)
134 %doc CHANGES.txt apache2/README.txt LICENSE.txt doc/LICENSE_110.txt
135 %attr(755,root,root) %{_pkglibdir}/mod_%{name}.so
136 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
139 %files -n python-scgi
140 %defattr(644,root,root,755)
141 %doc LICENSE.txt doc/LICENSE_110.txt
142 %dir %{py_sitedir}/scgi
143 %attr(755,root,root) %{py_sitedir}/scgi/passfd.so
144 %{py_sitedir}/scgi/*.py[co]
145 %{py_sitedir}/scgi-*.egg-info