%global tag git20090314 %global httpd_mod_dir %{_libdir}/httpd/modules %global httpd_conf_dir %{_sysconfdir}/httpd/conf.d Name: mod_perlite Version: 0.09 # I'm treating this as a pre-release as we don't have any actual tarballs yet. Release: 0.1%{?tag:.%{tag}}%{?dist} Summary: Kinder, gentler embedded Perl for the Apache HTTP Server Group: System Environment/Daemons # see Build.PL, README License: GPL+ or Artistic URL: http://modperlite.org # git commit tag in changelog, below # git://github.com/sodabrew/mod_perlite.git Source0: mod_perlite-%{tag}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(ExtUtils::Embed), perl(Module::Build) BuildRequires: httpd-devel >= 2.2.0, httpd, gdbm-devel BuildRequires: apr-devel >= 1.2.0, apr-util-devel Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:WITH_THREADS) Requires: perl(:WITH_PERLIO) %description mod_perlite is a lightweight Perl module for Apache 2.x that is easy to install, easy to use, and compatible with the CGI spec. Your script can find out if it is running under mod_perlite by checking $ENV{MOD_PERLITE}, which, if present, contains the version of mod_perlite installed. %prep %setup -q -n %{name} %build %{__perl} Build.PL installdirs=vendor optimize="%{optflags}" ./Build build %install rm -rf %{buildroot} ./Build install destdir=%{buildroot} create_packlist=0 # and our apache module... mkdir -p %{buildroot}%{httpd_mod_dir} cp mod_perlite.so %{buildroot}%{httpd_mod_dir}/ # install our conf file... mkdir -p %{buildroot}%{httpd_conf_dir} cat mod_perlite.conf | sed -re 's/^\s+//; s/AddDir/Dir/; /IfDefine/d' \ > %{buildroot}%{httpd_conf_dir}/perlite.conf %{_fixperms} %{buildroot} %check ## This seems to fail #./Build test prove -b t/* %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc TODO README %config(noreplace) %{httpd_conf_dir}/*.conf %{httpd_mod_dir}/mod_perlite.so %{perl_vendorlib}/* %{_mandir}/man3/*.3* %changelog * Sat Mar 14 2009 Chris Weyl 0.09-0.1 - initial packaging (thanks, mod_perl.spec!) - based off git a77521aa84ea5b8c5bcc3e387451acd9368292ee