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