]> git.pld-linux.org Git - SPECS.git/blob - scgi.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / scgi.spec
1 # TODO:
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
6 #
7 # Conditional build:
8 %bcond_without  apache          # don't build the apache module
9 #
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)
13 Name:           scgi
14 Version:        1.14
15 Release:        1
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/
22 %if %{with apache}
23 BuildRequires:  %{apxs}
24 BuildRequires:  apache-devel >= 2.0
25 %endif
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)
30
31 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
32 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
33
34 %description
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
38 implement.
39
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.
45
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
52
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
57 implement.
58
59 In this package you can find an Apache module named mod_scgi that
60 implements the client side of the protocol.
61
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.
67
68 W tym pakiecie można znaleźć moduł dla serwera Apache nazwany
69 mod_scgi, który implementuje klienta protokołu SCGI.
70
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
76
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
81 implement.
82
83 In this package you can find a Python package named scgi that
84 implements the server side of the protocol.
85
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.
91
92 W tym pakiecie można znaleźć moduł Pythona implementujący serwer
93 protokołu SCGI.
94
95 %prep
96 %setup -q
97
98 %build
99 %if %{with apache}
100 cd apache2
101 %{apxs} -c mod_scgi.c
102 cd ..
103 %endif
104 env CFLAGS="%{rpmcflags}" %{__python} setup.py build
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 %if %{with apache}
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
112 %endif
113
114 %{__python} setup.py install \
115         --root=$RPM_BUILD_ROOT \
116         --optimize=2
117
118 %py_postclean
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %post -n apache-mod_scgi
124 %service httpd restart
125
126 %preun -n apache-mod_scgi
127 if [ "$1" = "0" ]; then
128         %service httpd restart
129 fi
130
131 %if %{with apache}
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
137 %endif
138
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
This page took 0.729364 seconds and 3 git commands to generate.