%define pkg_name Apache-Dir %define pkg_version 0.04 %define rpm_pkg_version 0.04 %define rpm_pkg_release 1.n0i.1 Summary: OO (subclassable) mod_dir replacement Name: perl-%{pkg_name} Version: %{rpm_pkg_version} %if "%{pkg_version}" == "%{rpm_pkg_version}" Release: %{rpm_pkg_release} %else Release: %{rpm_pkg_release}.%(echo %{pkg_version} | tr - _) %endif Group: Development/Libraries License: GPL or Artistic URL: http://search.cpan.org/dist/%{pkg_name}/ Source0: ftp://ftp.cpan.org/authors/id/D/DW/DWHEELER/%{pkg_name}-%{pkg_version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: perl(:MODULE_COMPAT_%(%{__perl} -le 'printf "%%vd", $^V')) %description This simple module is designed to be a partial replacement for the standard Apache "mod_dir" module. One of the things that module does is to redirect browsers to a directory URL ending in a slash when they request the directory without the slash. Since "mod_dir" seems do its thing during the Apache response phase, if you use a Perl handler, it won't run. This can be problematic if the Perl handler doesn't likewise take the directory redirecting into account. %prep %setup -n %{pkg_name}-%{pkg_version} %build PERL_MM_USE_DEFAULT=1 %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{!?_without_test:%{__make} test} %install %{__rm} -rf $RPM_BUILD_ROOT %{__make} pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -name .packlist -delete || : find $RPM_BUILD_ROOT -type f -name '*.bs' -a -empty -delete || : find $RPM_BUILD_ROOT -depth -type d -a -empty -delete || : %{__chmod} -R u+w,go-w $RPM_BUILD_ROOT/* find $RPM_BUILD_ROOT | xargs -r touch %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc Changes README %{perl_vendorlib}/* %{_mandir}/man*/* %changelog * Tue Sep 13 2005 Marius Feraru 0.04-1.n0i.1 - spec file (re)created using N0i::CPAN::RPMizer/1.10 - rebuild on perl 5.8.7