]> git.pld-linux.org Git - packages/perl-CGI-SpeedyCGI.git/blame_incremental - perl-CGI-SpeedyCGI.spec
- x32 rebuild
[packages/perl-CGI-SpeedyCGI.git] / perl-CGI-SpeedyCGI.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without apache1 # don't build apache1 module
5%bcond_without apache2 # don't build apache2 module
6#
7%define apxs1 /usr/sbin/apxs1
8%define apxs2 /usr/sbin/apxs
9%include /usr/lib/rpm/macros.perl
10%define pdir CGI
11%define pnam SpeedyCGI
12Summary: Speed up perl CGI scripts by running them persistently
13Summary(pl.UTF-8): Moduł przyspieszający perlowe skrypty CGI
14Name: perl-CGI-SpeedyCGI
15Version: 2.22
16Release: 23
17License: GPL v2+
18Group: Networking/Daemons
19Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
20# Source0-md5: 2f80df78874e3efa80f180923c4967a1
21Source1: apache-mod_speedycgi.conf
22Patch0: %{name}-DESTDIR.patch
23Patch1: %{name}-APXS.patch
24Patch2: %{name}-debian.patch
25URL: http://daemoninc.com/SpeedyCGI/
26%{?with_apache2:BuildRequires: apache-devel}
27%{?with_apache1:BuildRequires: apache1-devel}
28BuildRequires: perl-devel >= 1:5.8.0
29BuildRequires: rpm-perlprov >= 3.0.3-16
30BuildRequires: rpmbuild(macros) >= 1.268
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%if %{with apache1}
34%define apache1confdir %(%{apxs1} -q SYSCONFDIR 2>/dev/null)/conf.d
35%define apache1libdir %(%{apxs1} -q LIBEXECDIR 2>/dev/null)
36%define apache1docdir /home/services/apache
37%endif
38%if %{with apache2}
39%define apache2confdir %(%{apxs2} -q SYSCONFDIR 2>/dev/null)/conf.d
40%define apache2libdir %(%{apxs2} -q LIBEXECDIR 2>/dev/null)
41%define apache2docdir /home/services/httpd
42%endif
43
44%description
45SpeedyCGI is a way to run CGI perl scripts persistently, which usually
46makes them run much more quickly. After the script is initially run,
47instead of exiting, SpeedyCGI keeps the perl interpreter running in
48memory. During subsequent runs, this interpreter is used to handle new
49requests, instead of starting a new perl interpreter for each
50execution.
51
52%description -l pl.UTF-8
53SpeedyCGI to sposób na ciągłe działanie perlowych skryptów CGI, co
54zazwyczaj powoduje, że uruchamiają się dużo szybciej. Po początkowym
55uruchomieniu skryptu, SpeedyCGI trzyma interpreter Perla w pamięci.
56Przy kolejnych uruchomieniach ten interpreter jest wykorzystywany do
57obsługi kolejnych zleceń, zamiast uruchamiania nowego interpretera
58Perla do każdego uruchomienia skryptu.
59
60%package -n apache-mod_speedycgi
61Summary: SpeedyCGI apache module
62Summary(pl.UTF-8): Moduł apache SpeedyCGI
63Group: Networking/Daemons
64Requires: %{name} = %{version}-%{release}
65Requires: apache(modules-api) = %apache_modules_api
66
67%description -n apache-mod_speedycgi
68SpeedyCGI apache module.
69
70%description -n apache-mod_speedycgi -l pl.UTF-8
71Moduł apache SpeedyCGI.
72
73%package -n apache1-mod_speedycgi
74Summary: SpeedyCGI apache module
75Summary(pl.UTF-8): Moduł apache SpeedyCGI
76Group: Networking/Daemons
77Requires: %{name} = %{version}-%{release}
78Requires: apache1 >= 1.3.33-2
79
80%description -n apache1-mod_speedycgi
81SpeedyCGI apache module.
82
83%description -n apache1-mod_speedycgi -l pl.UTF-8
84Moduł apache SpeedyCGI.
85
86%prep
87%setup -q -n %{pdir}-%{pnam}-%{version}
88%patch0 -p1
89%patch1 -p1
90%patch2 -p1
91
92%build
93%{__perl} Makefile.PL </dev/null \
94 INSTALLDIRS=vendor
95%{?with_apache1:cd mod_speedycgi && perl Makefile.PL && cd ..}
96%{?with_apache2:cd mod_speedycgi2 && perl Makefile.PL && cd ..}
97
98%{__make} -j1 \
99 CC="%{__cc}" \
100 OPTIMIZE="%{rpmcflags}"
101
102%if %{with apache1}
103%{__make} -C mod_speedycgi APXS="%{apxs1}" \
104 CC="%{__cc}" \
105 OPTIMIZE="%{rpmcflags}"
106%endif
107%if %{with apache2}
108%{__make} -C mod_speedycgi2 APXS="%{apxs2}" \
109 CC="%{__cc}" \
110 OPTIMIZE="%{rpmcflags}"
111%endif
112
113%{?with_test:%{__make} test}
114
115%install
116rm -rf $RPM_BUILD_ROOT
117install -d $RPM_BUILD_ROOT%{perl_archlib}
118
119%{__make} install \
120 DESTDIR=$RPM_BUILD_ROOT
121
122%if %{with apache1}
123install -d $RPM_BUILD_ROOT{%{apache1libdir},%{apache1docdir}/speedy,%{apache1confdir}}
124install %{SOURCE1} $RPM_BUILD_ROOT%{apache1confdir}/mod_speedycgi.conf
125install mod_speedycgi/mod_speedycgi.so $RPM_BUILD_ROOT%{apache1libdir}
126%endif
127%if %{with apache2}
128install -d $RPM_BUILD_ROOT{%{apache2libdir},%{apache2docdir}/speedy,%{apache2confdir}}
129install %{SOURCE1} $RPM_BUILD_ROOT%{apache2confdir}/90_mod_speedycgi.conf
130install mod_speedycgi2/mod_speedycgi.so $RPM_BUILD_ROOT%{apache2libdir}
131%endif
132
133ln -s speedy $RPM_BUILD_ROOT%{_bindir}/speedycgi
134
135%clean
136rm -rf $RPM_BUILD_ROOT
137
138%post -n apache-mod_speedycgi
139%service -q httpd restart
140
141%post -n apache1-mod_speedycgi
142%service -q apache restart
143
144%preun -n apache-mod_speedycgi
145if [ "$1" = "0" ]; then
146 %service -q httpd restart
147fi
148
149%preun -n apache1-mod_speedycgi
150if [ "$1" = "0" ]; then
151 %service -q apache restart
152fi
153
154%files
155%defattr(644,root,root,755)
156%doc README docs contrib
157%{perl_vendorlib}/CGI/*.pm
158%attr(755,root,root) %{_bindir}/speedy*
159
160%if %{with apache1}
161%files -n apache1-mod_speedycgi
162%defattr(644,root,root,755)
163%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apache1confdir}/*mod_speedycgi.conf
164%attr(755,root,root) %{apache1libdir}/mod_speedycgi.so
165%dir %{apache1docdir}/*
166%endif
167
168%if %{with apache2}
169%files -n apache-mod_speedycgi
170%defattr(644,root,root,755)
171%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apache2confdir}/*mod_speedycgi.conf
172%attr(755,root,root) %{apache2libdir}/mod_speedycgi.so
173%dir %{apache2docdir}/*
174%endif
This page took 0.037599 seconds and 4 git commands to generate.