Blob Blame History Raw
Name:           perl-Class-Data-Accessor
Version:        0.04004
Release:        5%{?dist}
Summary:        Inheritable, overridable class and instance data accessor creation
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Class-Data-Accessor/
Source0:        http://www.cpan.org/authors/id/C/CL/CLACO/Class-Data-Accessor-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  perl >= 1:5.6.1
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

# core
#BuildRequires: perl(Carp) 
BuildRequires: perl(ExtUtils::MakeMaker) 
BuildRequires: perl(Test::More)
# cpan
# test -- note, following three only needed when author tests are enabled
#BuildRequires: perl(Test::Pod)
#BuildRequires: perl(Test::Pod::Coverage)
#BuildRequires: perl(Test::Spelling)



%description
Class::Data::Accessor is the marriage of Class::Accessor and
Class::Data::Inheritable into a single module. It is used for creating
accessors to class data that overridable in subclasses as well as in class
instances.

%prep
%setup -q -n Class-Data-Accessor-%{version}

sed -i 's/\r//' t/*.t Changes
perl -pi -e 's|^#!perl|#!/usr/bin/perl|' t/*.t

cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
sed -e '/perl(Test::More)/d'
EOF

%global __perl_requires %{_builddir}/Class-Data-Accessor-%{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
# set TEST_AUTHOR=1 to enable the upstream author tests.
make test

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes README t/
%{perl_vendorlib}/*
%{_mandir}/man3/*

%changelog
* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 0.04004-5
- rebuild against perl 5.10.1

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.04004-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jun 17 2009 Iain Arnell <iarnell@gmail.com> 0.04004-3
- filter out requires perl(Test::More)

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

* Thu Sep 25 2008 Chris Weyl <cweyl@alumni.drew.edu> 0.04004-1
- update to 0.04004

* Fri Aug 08 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.04003-1
- update to 0.04003
- license fixed

* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.04001-2
Rebuild for new perl

* Thu May 31 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.04001-1
- update -- 0.40001 clarifies conflicting license statements

* Wed May 16 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.04000-3
- bump

* Wed May 16 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.04000-2
- license -> Artistic until conflicting statements are resolved. See also
  http://rt.cpan.org/Ticket/Display.html?id=27146

* Tue May 15 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.04000-1
- Specfile autogenerated by cpanspec 1.71.