]> git.pld-linux.org Git - packages/perl-CGI-SpeedyCGI.git/blame - perl-CGI-SpeedyCGI.spec
- removed lines with LoadModule, AddModule.
[packages/perl-CGI-SpeedyCGI.git] / perl-CGI-SpeedyCGI.spec
CommitLineData
2d7e8b2d 1%include /usr/lib/rpm/macros.perl
2%define perlname CGI-SpeedyCGI
3
4Summary: Speed up perl CGI scripts by running them persistently
5Name: perl-%{perlname}
abbd5357 6Version: 2.0.1
c17bc7b6 7Release: 2
8License: GPL
2d7e8b2d 9Group: Networking/Daemons
c17bc7b6 10Group(de): Netzwerkwesen/Server
2d7e8b2d 11Group(pl): Sieciowe/Serwery
12Source0: http://daemoninc.com/speedycgi/%{perlname}-%{version}.tar.gz
13Source1: apache-mod_speedycgi.conf
14BuildRequires: rpm-perlprov >= 3.0.3-16
c17bc7b6 15BuildRequires: perl >= 5.6
2d7e8b2d 16%requires_eq perl
17Requires: %{perl_sitearch}
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
c17bc7b6 20%define apache_moddir %(/usr/sbin/apxs -q LIBEXECDIR)
2d7e8b2d 21
22%description
23SpeedyCGI is a way to run CGI perl scripts persistently, which usually
24makes them run much more quickly. After the script is initially run,
25instead of exiting, SpeedyCGI keeps the perl interpreter running in
26memory. During subsequent runs, this interpreter is used to handle new
27requests, instead of starting a new perl interpreter for each
28execution.
29
30%package -n apache-mod_speedycgi
31Summary: SpeedyCGI apache module
32Group: Networking/Daemons
c17bc7b6 33Group(de): Netzwerkwesen/Server
2d7e8b2d 34Group(pl): Sieciowe/Serwery
35Requires: %{name} = %{version}
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description -n apache-mod_speedycgi
c17bc7b6 39SpeedyCGI apache module.
2d7e8b2d 40
41%prep
42%setup -q -n %{perlname}-%{version}
43
44%build
45perl Makefile.PL
46( cd mod_speedycgi && perl Makefile.PL )
47
c17bc7b6 48%{__make} OPTIMIZE="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS}"
49%{__make} -C mod_speedycgi \
50 OPTIMIZE="%{?debug:-O -g}%{!?debug:$RPM_OPT_FLAGS}" \
51 APXS="/usr/sbin/apxs"
2d7e8b2d 52
53%install
54rm -rf $RPM_BUILD_ROOT
c17bc7b6 55install -d $RPM_BUILD_ROOT/%{perl_archlib} \
56 $RPM_BUILD_ROOT{%{apache_moddir},/home/httpd/speedy,%{_sysconfdir}/httpd}
2d7e8b2d 57
58%{__make} install \
59 DESTDIR=$RPM_BUILD_ROOT
2d7e8b2d 60
2d7e8b2d 61install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/mod_speedycgi.conf
62install mod_speedycgi/mod_speedycgi.so $RPM_BUILD_ROOT%{apache_moddir}
c17bc7b6 63
2d7e8b2d 64gzip -9nf README docs/*.txt contrib/Mason-SpeedyCGI-HOWTO
2d7e8b2d 65
66%clean
67rm -rf $RPM_BUILD_ROOT
68
69%post -n apache-mod_speedycgi
70HTTPDCONF=%{_sysconfdir}/httpd/httpd.conf
71if [ -f $HTTPDCONF ] && \
72 ! grep -q "^Include.*/mod_speedycgi.conf" $HTTPDCONF; then
73 echo "Include /etc/httpd/mod_speedycgi.conf" >> $HTTPDCONF
74fi
75if [ -f /var/lock/subsys/httpd ]; then
76 /etc/rc.d/init.d/httpd restart 1>&2
77else
78 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
79fi
80
81%postun -n apache-mod_speedycgi
82HTTPDCONF=%{_sysconfdir}/httpd/httpd.conf
83grep -E -v "^Include.*mod_speedycgi.conf" $HTTPDCONF > $HTTPDCONF.tmp$$
c17bc7b6 84mv -f $HTTPDCONF.tmp$$ $HTTPDCONF
2d7e8b2d 85if [ -f /var/lock/subsys/httpd ]; then
86 /etc/rc.d/init.d/httpd restart 1>&2
87fi
88
89%files
90%defattr(644,root,root,755)
c17bc7b6 91%doc *.gz docs contrib
2d7e8b2d 92%{perl_sitelib}/CGI/*.pm
2d7e8b2d 93%attr(755,root,root) %{_bindir}/speedy*
2d7e8b2d 94
95%files -n apache-mod_speedycgi
96%defattr(644,root,root,755)
97%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/mod_speedycgi.conf
98%{apache_moddir}/mod_speedycgi.so
99%dir /home/httpd/speedy
This page took 0.034388 seconds and 4 git commands to generate.