[perl-DateTime] Unbundle DateTime::TimeZone and DateTime::Locale (rhbz#730658)

Iain Arnell iarnell at fedoraproject.org
Thu Aug 18 15:21:55 UTC 2011


commit 8baa9ed24863cb36050be1ba34dfff142fe8f53c
Author: Iain Arnell <iarnell at gmail.com>
Date:   Thu Aug 18 17:19:00 2011 +0200

    Unbundle DateTime::TimeZone and DateTime::Locale (rhbz#730658)
    
    - Bump epoch and revert to upstream versioning
    - Specfile regenerated by cpanspec 1.78.
    - Update description

 perl-DateTime.spec |  173 +++++++++++++---------------------------------------
 sources            |    2 -
 2 files changed, 43 insertions(+), 132 deletions(-)
---
diff --git a/perl-DateTime.spec b/perl-DateTime.spec
index b3edd19..732ce2b 100644
--- a/perl-DateTime.spec
+++ b/perl-DateTime.spec
@@ -1,158 +1,71 @@
-%define DT_version 0.70
-%define DTLocale_version 0.45
-%define DTTimeZone_version 1.35
-
 Name:           perl-DateTime
-# must now be 0.xx00 to preserve upgrade path:
-Version:        %{DT_version}00
-Release:        3%{?dist}
-Epoch:          1
-Summary:        Date and time objects
-License:        Artistic 2.0 and (GPL+ or Artistic)
+Epoch:          2
+Version:        0.70
+Release:        1%{?dist}
+Summary:        Date and time object
+License:        Artistic 2.0
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/DateTime/
-Source0:        http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-%{DT_version}.tar.gz
-Source1:        http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-TimeZone-%{DTTimeZone_version}.tar.gz
-Source2:        http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-%{DTLocale_version}.tar.gz
-BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-BuildRequires:  perl(Class::ISA)
-BuildRequires:  perl(Class::Load)
-BuildRequires:  perl(Class::Singleton) >= 1.03
-BuildRequires:  perl(File::Find::Rule)
-BuildRequires:  perl(List::MoreUtils)
+Source0:        http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-%{version}.tar.gz
+# circular dependency - only used for one test
+#BuildRequires:  perl(DateTime::Format::Strptime) >= 1.2000
+BuildRequires:  perl(DateTime::Locale) >= 0.41
+BuildRequires:  perl(DateTime::TimeZone) >= 1.09
 BuildRequires:  perl(Math::Round)
-BuildRequires:  perl(Module::Build) >= 0.35
-# or better:
-#BuildRequires:  perl(Module::Build) >= 0.36
-BuildRequires:  perl(Params::Validate) >= 0.91
-BuildRequires:  perl(Pod::Man) >= 1.14
+BuildRequires:  perl(Module::Build)
+BuildRequires:  perl(Params::Validate) >= 0.76
+BuildRequires:  perl(Scalar::Util)
 BuildRequires:  perl(Test::Exception)
-BuildRequires:  perl(Test::More) >= 0.34
-BuildRequires:  perl(Test::Output)
-BuildRequires:  perl(Test::Pod) >= 1.14
-BuildRequires:  perl(Test::Pod::Coverage) >= 1.08
-BuildRequires:  perl(parent)
-Requires:       perl(Class::Singleton) >= 1.03
-Requires:       perl(Params::Validate) >= 0.91
+BuildRequires:  perl(Test::More) >= 0.88
+BuildRequires:  perl(Time::Local) >= 1.04
+Requires:       perl(DateTime::Locale) >= 0.41
+Requires:       perl(DateTime::TimeZone) >= 1.09
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-Provides:       perl-DateTime-TimeZone = %{DTTimeZone_version}
-Provides:       perl-DateTime-Locale = %{DTLocale_version}
-Provides:       perl(DateTimePP)
-Provides:       perl(DateTimePPExtra)
 
-%{?filter_setup:
-%filter_from_requires /^perl(Win32/d
-# drop the unversioned provide:
-%filter_from_provides /^perl(DateTime)$/d
-%?perl_default_filter
-}
+# not automatically detected
+Provides:       perl(DateTimePP) = %{version}
+Provides:       perl(DateTimePPExtra) = %{version}
 
-%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(DateTime\\)$
-%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Win32
+%{?perl_default_filter}
 
 %description
-DateTime is a class for the representation of date/time combinations, and
-is part of the Perl DateTime project. For details on this project please
-see http://datetime.perl.org/. The DateTime site has a FAQ which may help
-answer many "how do I do X?" questions. The FAQ is at
-http://datetime.perl.org/wiki/datetime/page/FAQ
+DateTime is a class for the representation of date/time combinations.  It
+represents the Gregorian calendar, extended backwards in time before its
+creation (in 1582). This is sometimes known as the "proleptic Gregorian
+calendar". In this calendar, the first day of the calendar (the epoch), is the
+first day of year 1, which corresponds to the date which was (incorrectly)
+believed to be the birth of Jesus Christ.
 
 %prep
-%setup -q -T -c -n DateTimeBundle -a 0
-%setup -q -T -D -n DateTimeBundle -a 1
-%setup -q -T -D -n DateTimeBundle -a 2
-
-(
-for f in \
-  DateTime-%{DT_version}/lib/DateTime/LeapSecond.pm \
-  DateTime-Locale-%{DTLocale_version}/Changes
-do
-iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 && mv $f.utf8 $f
-done
-)
+%setup -q -n DateTime-%{version}
 
 %build
-cd DateTime-Locale-%{DTLocale_version}
-%{__perl} Build.PL installdirs=vendor
-./Build
-cd -
-
-cd DateTime-TimeZone-%{DTTimeZone_version}
-%{__perl} Makefile.PL installdirs=vendor
-make %{?_smp_mflags}
-cd -
-
-cd DateTime-%{DT_version}
-PERLLIB=../DateTime-Locale-%{DTLocale_version}/blib/lib
-PERLLIB=$PERLLIB:../DateTime-TimeZone-%{DTTimeZone_version}/blib/lib
-export PERLLIB
-%{__perl} Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
+%{__perl} Build.PL installdirs=vendor optimize="%{optflags}"
 ./Build
-cd -
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
-for d in DateTime-Locale-%{DTLocale_version} \
-         DateTime-%{DT_version}; do
-  cd $d
-  ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
-  cd -
-done
-cd DateTime-TimeZone-%{DTTimeZone_version}
-make pure_install DESTDIR=%{buildroot}
-cd -
-
-find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
-find $RPM_BUILD_ROOT -depth -type d -empty -exec rmdir {} \;
-
-%{_fixperms} $RPM_BUILD_ROOT/*
+./Build install destdir=%{buildroot} create_packlist=0
+find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
 
-
-# Move documentation into bundle area
-mkdir DT::Locale DT::TimeZone
-mv DateTime-%{DT_version}/{CREDITS,Changes,LICENSE,README,TODO} .
-mv DateTime-Locale-%{DTLocale_version}/{Changes,LICENSE.cldr} DT::Locale
-mv DateTime-TimeZone-%{DTTimeZone_version}/{Changes,README} DT::TimeZone
+%{_fixperms} %{buildroot}/*
 
 %check
-# Have to use PERL5LIB rather than PERLLIB here because the test scripts
-# clobber PERLLIB
-PERL5LIB=$(pwd)/DateTime-%{DT_version}/blib/arch:$(pwd)/DateTime-%{DT_version}/blib/lib
-PERL5LIB=$PERL5LIB:$(pwd)/DateTime-Locale-%{DTLocale_version}/blib/lib
-PERL5LIB=$PERL5LIB:$(pwd)/DateTime-TimeZone-%{DTTimeZone_version}/blib/lib
-export PERL5LIB
-
-# Run pod-related tests.
-IS_MAINTAINER=1
-export IS_MAINTAINER
-
-for d in DateTime-Locale-%{DTLocale_version} \
-         DateTime-%{DT_version}; do
-  cd $d
-  ./Build test
-  cd -
-done
-cd DateTime-TimeZone-%{DTTimeZone_version}
-make test
-cd -
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+RELEASE_TESTING=1 ./Build test
 
 %files
-%defattr(-,root,root,0755)
-%doc CREDITS Changes LICENSE README TODO DT::Locale DT::TimeZone
-%{_mandir}/man3/*
-# DateTime::TimeZone and DateTime::Locale modules are arch-independent
-%{perl_vendorlib}/DateTime/
-# DateTime module is arch-specific
+%doc Changes CREDITS LICENSE README TODO
 %{perl_vendorarch}/auto/*
-%{perl_vendorarch}/DateTime/
-%{perl_vendorarch}/DateTime*.pm
+%{perl_vendorarch}/DateTime*
+%{_mandir}/man3/*
 
 %changelog
+* Mon Aug 15 2011 Iain Arnell <iarnell at gmail.com> 2:0.70-1
+- Unbundle DateTime::TimeZone and DateTime::Locale
+- Bump epoch and revert to upstream versioning
+- Specfile regenerated by cpanspec 1.78.
+- Update description
+
 * Wed Jul 20 2011 Petr Sabata <contyk at redhat.com> - 1:0.7000-3
 - Perl mass rebuild
 
diff --git a/sources b/sources
index c928b05..823b718 100644
--- a/sources
+++ b/sources
@@ -1,3 +1 @@
-8ba6a4b70f8fa7d987529c2e2c708862  DateTime-Locale-0.45.tar.gz
 228a3ca93b49e308fc7a3b7a47341ab3  DateTime-0.70.tar.gz
-5866f392d011f2579168c427231cc569  DateTime-TimeZone-1.35.tar.gz


More information about the perl-devel mailing list