]> git.pld-linux.org Git - packages/perl-CGI-SpeedyCGI.git/blame - perl-CGI-SpeedyCGI.spec
- x32 rebuild
[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
92a1ec65 16Release: 23
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
f01bf456 24Patch2: %{name}-debian.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
2d7e8b2d 31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
8001a04b 33%if %{with apache1}
cb10815e
ER
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
8001a04b 42%endif
2d7e8b2d 43
5ebc055f 44%description
2d7e8b2d 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
cd43e9ff
JR
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.
60576458 56Przy kolejnych uruchomieniach ten interpreter jest wykorzystywany do
cd43e9ff
JR
57obsługi kolejnych zleceń, zamiast uruchamiania nowego interpretera
58Perla do każdego uruchomienia skryptu.
60576458 59
2d7e8b2d 60%package -n apache-mod_speedycgi
61Summary: SpeedyCGI apache module
4860b64f 62Summary(pl.UTF-8): Moduł apache SpeedyCGI
2d7e8b2d 63Group: Networking/Daemons
8001a04b
ER
64Requires: %{name} = %{version}-%{release}
65Requires: apache(modules-api) = %apache_modules_api
2d7e8b2d 66
67%description -n apache-mod_speedycgi
c17bc7b6 68SpeedyCGI apache module.
2d7e8b2d 69
cd43e9ff
JR
70%description -n apache-mod_speedycgi -l pl.UTF-8
71Moduł apache SpeedyCGI.
60576458 72
8001a04b
ER
73%package -n apache1-mod_speedycgi
74Summary: SpeedyCGI apache module
4860b64f 75Summary(pl.UTF-8): Moduł apache SpeedyCGI
8001a04b
ER
76Group: Networking/Daemons
77Requires: %{name} = %{version}-%{release}
9ef79e00 78Requires: apache1 >= 1.3.33-2
8001a04b
ER
79
80%description -n apache1-mod_speedycgi
81SpeedyCGI apache module.
82
cd43e9ff
JR
83%description -n apache1-mod_speedycgi -l pl.UTF-8
84Moduł apache SpeedyCGI.
8001a04b 85
2d7e8b2d 86%prep
e4c7aa49 87%setup -q -n %{pdir}-%{pnam}-%{version}
8d9fdf12
MP
88%patch0 -p1
89%patch1 -p1
aa8cd3fb 90%patch2 -p1
2d7e8b2d 91
92%build
48374d49 93%{__perl} Makefile.PL </dev/null \
94 INSTALLDIRS=vendor
8001a04b
ER
95%{?with_apache1:cd mod_speedycgi && perl Makefile.PL && cd ..}
96%{?with_apache2:cd mod_speedycgi2 && perl Makefile.PL && cd ..}
2d7e8b2d 97
6ef5b089 98%{__make} -j1 \
78a8ecc3 99 CC="%{__cc}" \
cee52be0 100 OPTIMIZE="%{rpmcflags}"
8001a04b
ER
101
102%if %{with apache1}
103%{__make} -C mod_speedycgi APXS="%{apxs1}" \
78a8ecc3 104 CC="%{__cc}" \
e4c7aa49 105 OPTIMIZE="%{rpmcflags}"
8001a04b
ER
106%endif
107%if %{with apache2}
cb10815e 108%{__make} -C mod_speedycgi2 APXS="%{apxs2}" \
78a8ecc3 109 CC="%{__cc}" \
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.091943 seconds and 4 git commands to generate.