%define upstream_name CGI-SpeedyCGI %define upstream_version 2.22 %define mod_name mod_speedycgi Name: perl-%{upstream_name} Version: %perl_convert_version %{upstream_version} Release: %mkrel 7 Summary: Speed up perl scripts by running them persistently License: GPLv3+ Group: Development/Perl Url: http://search.cpan.org/dist/%{upstream_name} Source0: http://www.cpan.org/modules/by-authors/id/H/HO/HORROCKS/%{upstream_name}-%{upstream_version}.tar.gz Source1: mod_speedycgi.conf Source2: speedycgi.conf Patch0: perl-CGI-SpeedyCGI-2.22-documentation.patch Patch1: perl-CGI-SpeedyCGI-2.22-empty_param.patch Patch2: perl-CGI-SpeedyCGI-2.22-strerror.patch Patch3: perl-CGI-SpeedyCGI-2.22-brigade_foreach.patch Patch4: perl-CGI-SpeedyCGI-2.22-exit_messages.patch Patch5: perl-CGI-SpeedyCGI-2.22-perl_510.patch Patch6: perl-CGI-SpeedyCGI-2.22-force-apache2.patch BuildRequires: perl-devel BuildRequires: apache-devel BuildRequires: apr-devel %description SpeedyCGI is a way to run perl scripts persistently, which can make them run much more quickly. A script can be made to to run persistently by changing the interpreter line at the top of the script from: #!/usr/bin/perl to #!/usr/bin/speedy After the script is initially run, instead of exiting, the perl interpreter is kept running. During subsequent runs, this interpreter is used to handle new executions instead of starting a new perl interpreter each time. A very fast frontend program, written in C, is executed for each request. This fast frontend then contacts the persistent Perl process, which is usually already running, to do the work and return the results. %package -n apache-%{mod_name} Summary: SpeedyCGI module for the Apache HTTP Server Group: System/Servers Requires: apache Requires: %{name} = %{version}-%{release} %description -n apache-%{mod_name} The SpeedyCGI module for the Apache HTTP Server. It can be used to run perl scripts for web application persistently to make them more quickly. %prep %setup -q -n %{upstream_name}-%{upstream_version} %patch0 -p1 -b .documentation %patch1 -p1 -b .empty_param %patch2 -p1 -b .strerror %patch3 -p1 -b .brigade_foreach %patch4 -p1 -b .exit_messages %patch5 -p1 -b .perl_510 %patch6 -p1 -b .apache2 cp %{SOURCE1} %{mod_conf} %build %serverbuild #sed -i 's@apxs -@%{_sbindir}/apxs -@g' Makefile.PL src/SpeedyMake.pl \ # mod_speedycgi/t/ModTest.pm mod_speedycgi/t/mod_perl.t #sed -i 's@APXS=apxs@APXS=%{_sbindir}/apxs@g' mod_speedycgi/Makefile.tmpl echo yes | perl Makefile.PL INSTALLDIRS=vendor make OPTIMIZE="$CFLAGS" LDFLAGS="%{ldflags}" #check ##- this test does not work with 5.8.7. #rm speedy/t/be_memleak.t #make test %install rm -rf %{buildroot} make pure_install PERL_INSTALL_ROOT=%{buildroot} install -D -m 755 mod_speedycgi2/.libs/*.so %{buildroot}%{_httpd_moddir}/mod_speedycgi.so install -D -m 644 %{SOURCE1} %{buildroot}%{_httpd_modconfdir}/10_mod_speedycgi.conf install -D -m 644 %{SOURCE2} %{buildroot}%{_httpd_extconfdir}/speedycgi.conf %files %doc Changes README docs contrib util %{perl_vendorlib}/CGI/* %{_bindir}/speedy* %files -n apache-%{mod_name} %config(noreplace) %{_httpd_modconfdir}/10_mod_speedycgi.conf %config(noreplace) %{_httpd_extconfdir}/speedycgi.conf %{_httpd_moddir}/mod_speedycgi.so %changelog * Sun Jan 13 2013 umeabot <umeabot> 2.220.0-7.mga3 + Revision: 363571 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Aug 12 2012 guillomovitch <guillomovitch> 2.220.0-6.mga3 + Revision: 280824 - drop useless build dependencies - adapt to new apache setup * Sat Jul 07 2012 luigiwalser <luigiwalser> 2.220.0-5.mga3 + Revision: 268689 - fix module configuration to work with systemd (mga #6714) * Tue Mar 20 2012 luigiwalser <luigiwalser> 2.220.0-4.mga2 + Revision: 225034 - httpd restart is handled by filetriggers now * Mon Sep 19 2011 dmorgan <dmorgan> 2.220.0-3.mga2 + Revision: 145253 - Fix buildrequires - Fix apache requires * Thu Jan 13 2011 jquelin <jquelin> 2.220.0-2.mga1 + Revision: 9825 - imported package perl-CGI-SpeedyCGI