Blob Blame History Raw
Name:           perl-DateTime-Precise
Version:        1.05
Release:        6%{?dist}

Summary:        Perform common time and date operations with additional GPS operations

Group:          Development/Libraries
License:        Public Domain
URL:            http://search.cpan.org/dist/DateTime-Precise
Source0:        http://search.cpan.org/CPAN/authors/id/B/BZ/BZAJAC/DateTime-Precise-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  perl(ExtUtils::MakeMaker)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))


%description
The purpose of this library was to replace our dependence on Unix epoch time,
which, being limited to a range of about 1970 to 2030, is inadequate for our
purposes (we have data as old as 1870). This date library effectively handles
dates from A.D. 1000 to infinity, and would probably work all the way back to 0
(ignoring, of course, the switch-over to the Gregorian calendar). The useful
features of Unix epoch time (ease of date difference calculation and date
comparison, strict ordering) are preserved, and elements such as
human-legibility are added. The library handles fractional seconds and some
date/time manipulations used for the Global Positioning Satellite system.


%prep
%setup -q -n DateTime-Precise-%{version}

cat << EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} $* |\
  sed -e '/perl(bigfloat)/d' -e '/perl(bigint)/d'
EOF
%define __perl_provides %{_builddir}/DateTime-Precise-%{version}/%{name}-prov
chmod +x %{__perl_provides}

cat << EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
  sed -e '/perl(DateTime::Math\/bigfloat.pl)/d' -e '/perl(DateTime::Math\/bigint.pl)/d'
EOF
%define __perl_requires %{_builddir}/DateTime-Precise-%{version}/%{name}-req
chmod +x %{__perl_requires}


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


%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*


%check
make test


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc CHANGES README
%{perl_vendorlib}/*
%{_mandir}/man3/DateTime::Precise.3pm.gz


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

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

* Wed Mar  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.05-4
- rebuild for new perl

* Wed Jan 30 2008 Xavier Bachelot <xavier@bachelot.org> - 1.05-3
- Fix License: tag.
- Remove '| :' for %%check section.

* Fri Dec 21 2007 Xavier Bachelot <xavier@bachelot.org> - 1.05-2
- Clean up spec.

* Thu Jul 27 2006 Xavier Bachelot <xavier@bachelot.org> - 1.05-1
- Initial build.