Blob Blame History Raw
# Note:  Some tests for this package are disabled by default, as they
# require network access and would thus fail in the buildsys' mock
# environments.  To build locally while enabling tests, either:
#
#   rpmbuild ... --define '_with_network_tests 1' ...
#   rpmbuild ... --with network_tests ...
#   define _with_network_tests 1 in your ~/.rpmmacros
#
# Note that right now, the only way to run tests locally from a cvs sandbox
# "make noarch" type scenario is the third one.


Name:           perl-DateTime-Format-MySQL
Version:        0.04        
Release:        7%{?dist}
Summary:        Parse and format MySQL dates and times 

Group:          Development/Libraries
License:        GPL+ or Artistic
URL:            http://search.cpan.org/dist/DateTime-Format-MySQL            
Source0: http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/DateTime-Format-MySQL-%{version}.tar.gz        
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch 
BuildRequires:  perl(Module::Build), perl(DateTime)
BuildRequires:  perl(DateTime::Format::Builder)
BuildRequires:  perl(Test::More)

# not picked up explicitly, for whatever reason...
Requires:  perl(DateTime::Format::Builder)
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

# for signature checking
%{?_with_network_tests:BuildRequires: perl(Module::Signature) }


%description
This module understands the formats used by MySQL for its DATE, DATETIME,
TIME, and TIMESTAMP data types. It can be used to parse these formats in order
to create DateTime objects, and it can take a DateTime object and produce a
string representing it in the MySQL format.


%prep
%setup -q -n DateTime-Format-MySQL-%{version}

# digital signature checking.  Not essential, but nice
%{?_with_network_tests: cpansign -v }


%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} -type d -depth -exec rmdir {} 2>/dev/null ';'

%{_fixperms} %{buildroot}/*


%check
make test


%clean
rm -rf %{buildroot}


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


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

* Tue Mar 04 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.04-6
- rebuild for new perl

* Tue Jan 01 2008 Ralf Cors├ępius <rc040203@freenet.de> 0.04-5
- Adjust License-tag.
- Add BR: perl(Test::More) (BZ 419631).
- Minor spec cosmetics.

* Fri Sep 08 2006 Chris Weyl <cweyl@alumni.drew.edu>
- add missing explicit requires on perl(DateTime::Format::Builder)
- misc spec tweaks

* Thu Aug 31 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.04-3
- bump for mass rebuild

* Thu Aug 10 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.04-2
- bump for build & release

* Fri Aug 04 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.04-1
- Initial spec file for F-E