Blob Blame History Raw
Name:           perl-Catalyst-Runtime
Version:        5.71001
Release:        2%{?dist}
Summary:        Catalyst core modules
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Catalyst-Runtime/
# remember to rebuild perl-Catalyst-Devel on update of this package
Source0:        http://www.cpan.org/authors/id/M/MR/MRAMBERG/Catalyst-Runtime-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

# core
BuildRequires:  perl >= 1:5.8.1
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Harness)
# cpan
BuildRequires:  perl(CGI::Simple::Cookie)
BuildRequires:  perl(Class::Accessor::Fast)
BuildRequires:  perl(Class::Data::Inheritable)
BuildRequires:  perl(Class::Inspector)      >= 1.06
BuildRequires:  perl(Data::Dump)
BuildRequires:  perl(File::Modified)
BuildRequires:  perl(HTML::Entities)
BuildRequires:  perl(HTTP::Body)            >= 1.04 
BuildRequires:  perl(HTTP::Headers)         >= 1.64
BuildRequires:  perl(HTTP::Request)
BuildRequires:  perl(HTTP::Request::AsCGI)  >= 0.5
BuildRequires:  perl(HTTP::Response)
BuildRequires:  perl(LWP::UserAgent)
BuildRequires:  perl(Module::Pluggable)     >= 3.01
BuildRequires:  perl(Path::Class) >= 0.09
BuildRequires:  perl(Text::SimpleTable)     >= 0.03
BuildRequires:  perl(Tree::Simple)          >= 1.15
BuildRequires:  perl(Tree::Simple::Visitor::FindByPath)
BuildRequires:  perl(URI)                   >= 1.35
# test
BuildRequires:  perl(Class::C3)
BuildRequires:  perl(File::Copy::Recursive)
#BuildRequires:  perl(GTop)
BuildRequires:  perl(Proc::ProcessTable)
BuildRequires:  perl(Test::Pod)
BuildRequires:  perl(Test::Pod::Coverage)
BuildRequires:  perl(YAML)

# use base ...
Requires:       perl(Class::Accessor::Fast)
Requires:       perl(Class::Data::Inheritable)
# 'requires'
Requires:       perl(HTTP::Request::AsCGI) >= 0.5


%description
This is the primary class for the Catalyst-Runtime distribution.  It provides
the core of any runtime Catalyst instance.


%package        scripts
Summary:        Scripts for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    scripts
The %{name}-scripts package contains scripts distributed with
%{name} but generally used for developing Catalyst applications.


%prep
%setup -q -n Catalyst-Runtime-%{version}

# something like this seems to beg for explicitness
perldoc perlgpl      > COPYING.gpl
perldoc perlartistic > COPYING.artistic

find .  -type f -exec chmod -c -x {} +
find t/ -type f -exec perl -pi -e 's|^#!perl|#!/usr/bin/perl|' {} +

# make sure doc/tests don't generate provides
cat << \EOF > %{name}-prov
#!/bin/sh
FOO=`perl -p -e 's|%{buildroot}%{_docdir}/%{name}-%{version}\S+||'`
if [ "$FOO" != "" ] ; then %{__perl_provides} $FOO ; fi
EOF

%define __perl_provides %{_builddir}/Catalyst-Runtime-%{version}/%{name}-prov
chmod +x %{__perl_provides}

cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} `perl -p -e 's|%{buildroot}%{_docdir}/%{name}-%{version}\S+||'`
EOF

%define __perl_requires %{_builddir}/Catalyst-Runtime-%{version}/%{name}-req
chmod +x %{__perl_requires}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
rm -rf %{buildroot}

make pure_install PERL_INSTALL_ROOT=%{buildroot}

find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} %{buildroot}/*

%check
# note that some of the optional tests we're enabling here will be skipped
# anyways, due to deps on Catalyst::Devel, etc.  We cannot depend on
# Catalyst::Devel, however, as it depends on us, and circular dep loops are
# never fun.  (Well, maybe to Zeno.)
#
# See also http://rt.cpan.org/Public/Bug/Display.html?id=27123

export TEST_POD=1
export TEST_LIGHTTPD=1
export TEST_HTTP=1 
# fails weirdly.  see http://rt.cpan.org/Ticket/Display.html?id=26732
#export TEST_MEMLEAK=1 
export TEST_STRESS=1 
export TEST_THREADS=1 
make test
make clean

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes COPYING* t/
%{perl_vendorlib}/*
%{_mandir}/man3/*
# this is properly in perl-Catalyst-Manual
%exclude %{perl_vendorlib}/Catalyst/Manual.pm
%exclude %{_mandir}/man3/Catalyst::Manual.3*

%files scripts 
%defattr(-,root,root,-)
%{_bindir}/*
%{_mandir}/man1/*

%changelog
* Sat Apr 11 2009 Chris Weyl <cweyl@alumni.drew.edu> 5.71001-2
- return Catalyst::Manual perl-Catalyst-Manual

* Thu Apr 02 2009 Chris Weyl <cweyl@alumni.drew.edu> 5.71001-1
- update to 5.71001

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.71000-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Jan 25 2009 Chris Weyl <cweyl@alumni.drew.edu> 5.71000-1
- update to 5.71000

* Thu Oct 23 2008 Chris Weyl <cweyl@alumni.drew.edu> 5.7015-1
- update to 5.7015

* Mon Jun 23 2008 Chris Weyl <cweyl@alumni.drew.edu> 5.7014-3
- Quiet STDERR somewhat on build

* Sat May 31 2008 Chris Weyl <cweyl@alumni.drew.edu> 5.7014-2
- pull catalyst.pl back from perl-Catalyst-Devel, put into subpackage: too
  much of a headache to keep this bit of -Runtime in -Devel
- pull in tests
- deal with perl-Catalyst-Manual issues
  
* Sat May 31 2008 Chris Weyl <cweyl@alumni.drew.edu> 5.7014-1
- update to 5.7014

* Thu Mar 27 2008 Chris Weyl <cweyl@alumni.drew.edu> 5.7012-3
- nuke Catalyst/Manual.pm from this dist -- handled in perl-Catalyst-Manual

* Wed Mar 05 2008 Tom "spot" Callaway <tcallawa@redhat.com> 5.7012-2
- rebuild for new perl

* Sat Mar 01 2008 Chris Weyl <cweyl@alumni.drew.edu> 5.7012-1
- update to 5.7012

* Sun Oct 28 2007 Chris Weyl <cweyl@alumni.drew.edu> 5.7011-1
- update to 5.7011

* Mon May 14 2007 Chris Weyl <cweyl@alumni.drew.edu> 5.7007-4
- bump

* Mon May 14 2007 Chris Weyl <cweyl@alumni.drew.edu> 5.7007-3
- additional br's

* Fri Apr 27 2007 Chris Weyl <cweyl@alumni.drew.edu> 5.7007-2
- exclude catalyst.pl from this package -- it depends on
  perl(Catalyst::Helper), which is provided by perl-Catalyst-Devel (but which
  has a buildreq on this package).  We will provide catalyst.pl in
  perl-Catalyst-Devel instead.

* Tue Apr 10 2007 Chris Weyl <cweyl@alumni.drew.edu> 5.7007-1
- Specfile autogenerated by cpanspec 1.70.