%define _default_patch_fuzz 2 Name: perl-DBIx-Class Version: 0.08010 Release: 7%{?dist} Summary: Extensible and flexible object <-> relational mapper License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/DBIx-Class/ Source0: http://www.cpan.org/authors/id/A/AS/ASH/DBIx-Class-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) ## patches... Patch0: there_is_no_0.73.patch Patch2: fix_startup_check.patch # make tests skip a little more verbosely Patch3: verbose.patch # core BuildRequires: perl >= 1:5.6.1 BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Scalar::Util) bUIldRequires: perl(Storable) BuildRequires: perl(Test::Builder) >= 0.32 ## Dependencies BuildRequires: perl(Carp::Clan) BuildRequires: perl(Class::Accessor::Grouped) >= 0.05002 BuildRequires: perl(Class::C3) >= 0.13 BuildRequires: perl(Class::C3::Componentised) # for CDBI-compat bits... BuildRequires: perl(Class::Data::Inheritable) BuildRequires: perl(Class::Inspector) BuildRequires: perl(Class::Trigger) BuildRequires: perl(Data::Page) >= 2 # see BZ#245699 -- requires patched version, not CPAN BuildRequires: perl(DBD::SQLite) >= 1.13 BuildRequires: perl(DBI) >= 1.4 BuildRequires: perl(DBIx::ContextualFetch) BuildRequires: perl(JSON::Any) BuildRequires: perl(Module::Find) BuildRequires: perl(Scope::Guard) >= 0.03 BuildRequires: perl(SQL::Abstract) >= 1.2 # darn RPM version compares... #BuildRequires: perl(SQL::Abstract::Limit) >= 0.101 BuildRequires: perl(SQL::Abstract::Limit) BuildRequires: perl(Test::Exception) # optional tests BuildRequires: perl(DateTime::Format::MySQL) BuildRequires: perl(Text::CSV_XS) BuildRequires: perl(Test::Memory::Cycle) BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod::Coverage) BuildRequires: perl(SQL::Translator) BuildRequires: perl(DateTime) BuildRequires: perl(DateTime::Format::Oracle) BuildRequires: perl(DBIx::ContextualFetch) # not picked up... Requires: perl(Class::Accessor::Grouped) >= 0.05002 Requires: perl(Class::C3::Componentised) Requires: perl(SQL::Abstract) >= 1.2 # not picked up automagically (yet)... Provides: perl(DBIx::Class::ClassResolver::PassThrough) = 0 Provides: perl(DBIx::Class::Storage::TxnScopeGuard) = 0 %description This is an SQL to OO mapper with an object API inspired by Class::DBI (and a compatibility layer as a springboard for porting) and a resultset API that allows abstract encapsulation of database operations. It aims to make representing queries in your code as perl- ish as possible while still providing access to as many of the capabilities of the database as possible, including retrieving related records from multiple tables in a single query, JOIN, LEFT JOIN, COUNT, DISTINCT, GROUP BY and HAVING support. %prep %setup -q -n DBIx-Class-%{version} # correct version reqs in Makefile.PL %patch0 # don't complain; as near as I can tell this bug has been nixed in Fedora perl %patch2 # tell us why we're skipping, eh? %patch3 find t/ -type f -exec perl -pi -e 's|\r||; s|^#!perl|#!/usr/bin/perl|' {} + find . -type f -exec chmod -c -x {} + find t/ -type f -name '*.orig' -exec rm -v {} + # utf8 issues BAD='README ./lib/DBIx/Class/Storage/DBI/Replication.pm ./lib/DBIx/Class.pm' for i in $BAD ; do iconv -f iso8859-1 -t UTF-8 $i > foo mv foo $i done # Filter unwanted Provides: cat << \EOF > %{name}-prov #!/bin/sh %{__perl_provides} $* |\ sed \ -e '/perl(DBICVersion::Schema) = 1.0/d' \ -e '/perl(DBIC.*Test.*)/d' \ -e '/perl(My.*)/d' \ -e '/perl(DeletingFilm)/d' \ -e '/perl(.*Thing)/d' EOF %define __perl_provides %{_builddir}/DBIx-Class-%{version}/%{name}-prov chmod +x %{__perl_provides} # Filter unwanted Requires: cat << \EOF > %{name}-req #!/bin/sh %{__perl_requires} $* |\ sed \ -e '/perl(Time::Piece::MySQL)/d' \ -e '/perl(DBD::.*)/d' \ -e '/perl(DBIC.*Test.*)/d' \ -e '/perl(My.*)/d' \ -e '/perl(DeletingFilm)/d' \ -e '/perl(.*Thing)/d' EOF %define __perl_requires %{_builddir}/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 # note this test suite is noisy! make test %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc Changes README t/ %{perl_vendorlib}/* %{_bindir}/* %{_mandir}/man[13]/* %changelog * Wed Oct 01 2008 Chris Weyl 0.08010-7 - fix patch fuzz * Mon Jun 02 2008 Chris Weyl 0.08010-6 - bump * Wed Apr 09 2008 Chris Weyl 0.08010-5 - pod coverage testing NOT enabled; test currently "fails" - make tests skip a little more verbosely... - add a br of Class::Data::Inheritable for the CDBI-compat testing * Tue Apr 01 2008 Chris Weyl 0.08010-4 - drop unneeded patch1 - set explicit provides version to 0 :) * Wed Mar 19 2008 Chris Weyl 0.08010-3 - add perl(Test::Exception) as a br - revert patches to skip on DBD::SQLite < 1.13 * Tue Mar 18 2008 Chris Weyl 0.08010-2 - BR JSON -> JSON::Any - rework sqlite/tests patch to skip on DBD::SQLite < 1.15... 1.14 is in rawhide/f9, and frankly, doesn't quite pass muster *sigh* * Sun Mar 09 2008 Chris Weyl 0.08010-1 - update to 0.08010 * Wed Jan 16 2008 Chris Weyl 0.08008-3 - add additional BR's for optional tests * Fri Jan 11 2008 Chris Weyl 0.08008-2 - patch to work around certain tests as DBD::SQLite isn't going to 1.13 anytime soon (see RH#245699) * Tue Dec 04 2007 Chris Weyl 0.08008-1 - update to 0.08008 - correct provides filtering... * Tue Sep 18 2007 Chris Weyl 0.08007-1 - Specfile autogenerated by cpanspec 1.71.