Name: perl-Catalyst-Authentication-Store-DBIx-Class
Version: 0.1082
Release: 2%{?dist}
Summary: A storage class for Catalyst Authentication using DBIx::Class
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Catalyst-Authentication-Store-DBIx-Class/
Source0: http://search.cpan.org/CPAN/authors/id/J/JA/JAYK/Catalyst-Authentication-Store-DBIx-Class-%{version}.tar.gz
Source1: FedoraLicense.txt
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::More)
BuildRequires: perl(DBIx::Class)
BuildRequires: perl(Catalyst::Runtime)
BuildRequires: perl(Catalyst::Plugin::Authentication)
BuildRequires: perl(Catalyst::Model::DBIC::Schema)
# required for tests
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Test::WWW::Mechanize::Catalyst)
BuildRequires: perl(DBD::SQLite)
BuildRequires: perl(Catalyst::Plugin::Session::State::Cookie)
BuildRequires: perl(Catalyst::Plugin::Authorization::Roles)
%description
The Catalyst::Authentication::Store::DBIx::Class class provides access
to authentication information stored in a database via DBIx::Class.
%prep
%setup -q -n Catalyst-Authentication-Store-DBIx-Class-%{version}
# fix up .t files to shut up rpmlint
%{__sed} -i 's|#!perl|#!/usr/bin/perl|' t/*.t
# clarification on SimpleDB.pm licensing
%{__install} -m 0644 %{SOURCE1} .
# make sure doc/tests don't generate provides
# note we first filter out the bits in _docdir...
cat << \EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} `perl -p -e 's|\S+%{_docdir}/%{name}-%{version}\S+||'`
EOF
%define __perl_provides %{_builddir}/Catalyst-Authentication-Store-DBIx-Class-%{version}/%{name}-prov
chmod +x %{__perl_provides}
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} `perl -p -e 's|\S+%{_docdir}/%{name}-%{version}\S+||'`
EOF
%define __perl_requires %{_builddir}/Catalyst-Authentication-Store-DBIx-Class-%{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
TEST_POD=1 make test
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc FedoraLicense.txt Changes README t/
%{perl_vendorlib}/*
%{_mandir}/man3/*
%changelog
* Mon Jan 5 2009 Gabriel Somlo <somlo at cmu.edu> 0.1082-2
- added FedoraLicense.txt, clarifying licensing on SimpleDB.pm module
* Mon Jan 5 2009 Gabriel Somlo <somlo at cmu.edu> 0.1082-1
- initial specfile based on cpan2rpm and other catalyst examples by Chris Weyl