/[packages]/cauldron/perl-CGI-SpeedyCGI/current/SPECS/perl-CGI-SpeedyCGI.spec
ViewVC logotype

Contents of /cauldron/perl-CGI-SpeedyCGI/current/SPECS/perl-CGI-SpeedyCGI.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 145253 - (show annotations) (download)
Mon Sep 19 01:47:18 2011 UTC (12 years, 7 months ago) by dmorgan
File size: 3950 byte(s)
Fix buildrequires
1 %define upstream_name CGI-SpeedyCGI
2 %define upstream_version 2.22
3
4 %define Werror_cflags %{nil}
5
6 #Module-Specific definitions
7 %define apache_version 2.2.9
8 %define mod_name mod_speedycgi
9 %define mod_conf B49_%{mod_name}.conf
10 %define mod_so %{mod_name}.so
11
12 Name: perl-%{upstream_name}
13 Version: %perl_convert_version %{upstream_version}
14 Release: %mkrel 3
15
16 Summary: Speed up perl scripts by running them persistently
17 License: GPLv3+
18 Group: Development/Perl
19 Url: http://search.cpan.org/dist/%{upstream_name}
20 Source0: http://www.cpan.org/modules/by-authors/id/H/HO/HORROCKS/%{upstream_name}-%{upstream_version}.tar.gz
21 Source1: %{mod_conf}
22 Patch0: perl-CGI-SpeedyCGI-2.22-documentation.patch
23 Patch1: perl-CGI-SpeedyCGI-2.22-empty_param.patch
24 Patch2: perl-CGI-SpeedyCGI-2.22-strerror.patch
25 Patch3: perl-CGI-SpeedyCGI-2.22-brigade_foreach.patch
26 Patch4: perl-CGI-SpeedyCGI-2.22-exit_messages.patch
27 Patch5: perl-CGI-SpeedyCGI-2.22-perl_510.patch
28 Patch6: perl-CGI-SpeedyCGI-2.22-force-apache2.patch
29
30 BuildRequires: perl-devel
31 BuildRequires: perl(ExtUtils::MakeMaker)
32 BuildRequires: perl(ExtUtils::Embed)
33 BuildRequires: apache-devel >= %{apache_version}
34 BuildRequires: apr-devel
35 BuildRequires: libtool
36
37 %description
38 SpeedyCGI is a way to run perl scripts persistently, which can make them run
39 much more quickly. A script can be made to to run persistently by changing the
40 interpreter line at the top of the script from:
41 #!/usr/bin/perl
42 to
43 #!/usr/bin/speedy
44 After the script is initially run, instead of exiting, the perl interpreter is
45 kept running. During subsequent runs, this interpreter is used to handle new
46 executions instead of starting a new perl interpreter each time. A very fast
47 frontend program, written in C, is executed for each request. This fast
48 frontend then contacts the persistent Perl process, which is usually already
49 running, to do the work and return the results.
50
51 %package -n apache-%{mod_name}
52 Summary: SpeedyCGI module for the Apache HTTP Server
53 Group: System/Servers
54 Requires(pre): rpm-helper
55 Requires(postun): rpm-helper
56 Requires(pre): apache >= %{apache_version}
57 Requires: apache >= %{apache_version}
58 Requires: %{name} = %{version}-%{release}
59
60 %description -n apache-%{mod_name}
61 The SpeedyCGI module for the Apache HTTP Server. It can be used to run perl
62 scripts for web application persistently to make them more quickly.
63
64 %prep
65 %setup -q -n %{upstream_name}-%{upstream_version}
66 %patch0 -p1 -b .documentation
67 %patch1 -p1 -b .empty_param
68 %patch2 -p1 -b .strerror
69 %patch3 -p1 -b .brigade_foreach
70 %patch4 -p1 -b .exit_messages
71 %patch5 -p1 -b .perl_510
72 %patch6 -p1 -b .apache2
73
74 cp %{SOURCE1} %{mod_conf}
75
76 %build
77 %serverbuild
78
79 sed -i 's@apxs -@%{_sbindir}/apxs -@g' Makefile.PL src/SpeedyMake.pl \
80 mod_speedycgi/t/ModTest.pm mod_speedycgi/t/mod_perl.t
81 sed -i 's@APXS=apxs@APXS=%{_sbindir}/apxs@g' mod_speedycgi/Makefile.tmpl
82
83 echo yes | perl Makefile.PL INSTALLDIRS=vendor
84 make OPTIMIZE="$CFLAGS" LDFLAGS="%{ldflags}"
85
86 #check
87 ##- this test does not work with 5.8.7.
88 #rm speedy/t/be_memleak.t
89 #make test
90
91 %install
92 rm -rf %{buildroot}
93
94 make pure_install PERL_INSTALL_ROOT=%{buildroot}
95
96 install -d %{buildroot}%{_libdir}/apache-extramodules
97 install -d %{buildroot}%{_sysconfdir}/httpd/modules.d
98
99 install -m0755 mod_speedycgi2/.libs/*.so %{buildroot}%{_libdir}/apache-extramodules/
100 install -m0644 %{mod_conf} %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf}
101
102 %post -n apache-%{mod_name}
103 if [ -f %{_var}/lock/subsys/httpd ]; then
104 %{_initrddir}/httpd restart 1>&2;
105 fi
106
107 %postun -n apache-%{mod_name}
108 if [ "$1" = "0" ]; then
109 if [ -f %{_var}/lock/subsys/httpd ]; then
110 %{_initrddir}/httpd restart 1>&2
111 fi
112 fi
113
114 %files
115 %doc Changes README docs contrib util
116 %{perl_vendorlib}/CGI/*
117 %{_bindir}/speedy*
118
119 %files -n apache-%{mod_name}
120 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf}
121 %attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so}
122
123

  ViewVC Help
Powered by ViewVC 1.1.30