- new upstream version

- use Build.PL as Makefile.PL no longer exists
- use iconv to recode to utf-8, not a patch
- update BuildRequires
- drop Provides: perl(DateTime::TimeZoneCatalog), it is no longer there
- use filtering macros
This commit is contained in:
Štěpán Kasal 2010-01-15 19:27:57 +00:00
parent c722265950
commit 7b47ecafb9
6 changed files with 64 additions and 90 deletions

View File

@ -1,3 +1,3 @@
DateTime-0.4501.tar.gz DateTime-0.53.tar.gz
DateTime-Locale-0.42.tar.gz DateTime-Locale-0.44.tar.gz
DateTime-TimeZone-0.8301.tar.gz DateTime-TimeZone-1.08.tar.gz

View File

@ -1,16 +0,0 @@
--- DateTime-0.35/lib/DateTime/LeapSecond.pm.orig 2006-02-28 19:15:01.000000000 -0600
+++ DateTime-0.35/lib/DateTime/LeapSecond.pm 2006-11-03 15:53:44.000000000 -0600
@@ -159,11 +159,11 @@
=head1 AUTHOR
-Flávio Soibelmann Glock, E<lt>fglock@pucrs.brE<gt>
+Flávio Soibelmann Glock, E<lt>fglock@pucrs.brE<gt>
=head1 COPYRIGHT
-Copyright (c) 2003 Flávio Soibelmann Glock. Copyright (c) 2004-2006
+Copyright (c) 2003 Flávio Soibelmann Glock. Copyright (c) 2004-2006
David Rolsky. All rights reserved. This program is free software;
you can redistribute it and/or modify it under the same terms as Perl
itself.

View File

@ -1,6 +0,0 @@
#!/bin/sh
#
# Remove redundant unversioned provides of
# perl(DateTime) and perl(DateTime::TimeZone).
@@PERL_PROV@@ "$@" | sed -e '/^perl(DateTime\(::TimeZone\)\?)$/d'

View File

@ -1,3 +0,0 @@
#!/bin/sh
@@PERL_REQ@@ "$@" | sed -e '/^perl(Win32::.*$/d'

View File

@ -1,47 +1,49 @@
%define DTLocale_version 0.42 %define DT_version 0.53
%define DTTimeZone_version 0.8301 %define DTLocale_version 0.44
%define DTTimeZone_version 1.08
Name: perl-DateTime Name: perl-DateTime
Version: 0.4501 # must now be 0.xx00 to preserve upgrade path:
Release: 4%{?dist} Version: %{DT_version}00
Release: 1%{?dist}
Epoch: 1 Epoch: 1
Summary: Date and time objects Summary: Date and time objects
License: GPL+ or Artistic License: GPL+ or Artistic
Group: Development/Libraries Group: Development/Libraries
URL: http://search.cpan.org/dist/DateTime/ URL: http://search.cpan.org/dist/DateTime/
Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-%{version}.tar.gz 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 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 Source2: http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-%{DTLocale_version}.tar.gz
Patch0: DateTime-LeapSecond-utf8.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(Class::ISA)
BuildRequires: perl(Class::Singleton) >= 1.03 BuildRequires: perl(Class::Singleton) >= 1.03
BuildRequires: perl(ExtUtils::CBuilder)
BuildRequires: perl(File::Find::Rule) BuildRequires: perl(File::Find::Rule)
BuildRequires: perl(List::MoreUtils) BuildRequires: perl(List::MoreUtils)
BuildRequires: perl(Module::Build) BuildRequires: perl(Module::Build) >= 0.35
BuildRequires: perl(Params::Validate) >= 0.76 # or better:
#BuildRequires: perl(Module::Build) >= 0.36
BuildRequires: perl(Params::Validate) >= 0.91
BuildRequires: perl(Pod::Man) >= 1.14 BuildRequires: perl(Pod::Man) >= 1.14
BuildRequires: perl(Test::Exception)
BuildRequires: perl(Test::More) >= 0.34
BuildRequires: perl(Test::Output) BuildRequires: perl(Test::Output)
BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod) >= 1.14
BuildRequires: perl(Test::Pod::Coverage) >= 1.08 BuildRequires: perl(Test::Pod::Coverage) >= 1.08
# Creates a build dependency loop.
#BuildRequires: perl(DateTime::Format::ICal)
#BuildRequires: perl(DateTime::Format::Strptime)
Requires: perl(Class::Singleton) >= 1.03 Requires: perl(Class::Singleton) >= 1.03
Requires: perl(Params::Validate) >= 0.76 Requires: perl(Params::Validate) >= 0.91
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Provides: perl-DateTime-TimeZone = %{DTTimeZone_version} Provides: perl-DateTime-TimeZone = %{DTTimeZone_version}
Provides: perl-DateTime-Locale = %{DTLocale_version} Provides: perl-DateTime-Locale = %{DTLocale_version}
Provides: perl(DateTime::TimeZoneCatalog)
Provides: perl(DateTimePP) Provides: perl(DateTimePP)
Provides: perl(DateTimePPExtra) Provides: perl(DateTimePPExtra)
Source98: DateTime-filter-requires.sh %{?filter_setup:
%global real_perl_requires %{__perl_requires} %filter_from_requires /^perl(Win32/d
%define __perl_requires %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)-filter-requires # drop the unversioned provide:
%filter_from_provides /^perl(DateTime)$/d
Source99: DateTime-filter-provides.sh %?perl_default_filter
%global real_perl_provides %{__perl_provides} }
%define __perl_provides %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)-filter-provides
%description %description
DateTime is a class for the representation of date/time combinations, and DateTime is a class for the representation of date/time combinations, and
@ -55,15 +57,10 @@ http://datetime.perl.org/?FAQ.
%setup -q -T -D -n DateTimeBundle -a 1 %setup -q -T -D -n DateTimeBundle -a 1
%setup -q -T -D -n DateTimeBundle -a 2 %setup -q -T -D -n DateTimeBundle -a 2
cd DateTime-%{version} (
%patch0 -p1 f=DateTime-%{DT_version}/lib/DateTime/LeapSecond.pm
cd - iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 && mv $f.utf8 $f
)
sed -e 's,@@PERL_REQ@@,%{real_perl_requires},' %{SOURCE98} > %{__perl_requires}
chmod +x %{__perl_requires}
sed -e 's,@@PERL_PROV@@,%{real_perl_provides},' %{SOURCE99} > %{__perl_provides}
chmod +x %{__perl_provides}
%build %build
cd DateTime-Locale-%{DTLocale_version} cd DateTime-Locale-%{DTLocale_version}
@ -76,45 +73,41 @@ cd DateTime-TimeZone-%{DTTimeZone_version}
./Build ./Build
cd - cd -
cd DateTime-%{version} cd DateTime-%{DT_version}
PERLLIB=../DateTime-Locale-%{DTLocale_version}/blib/lib PERLLIB=../DateTime-Locale-%{DTLocale_version}/blib/lib
PERLLIB=$PERLLIB:../DateTime-TimeZone-%{DTTimeZone_version}/blib/lib PERLLIB=$PERLLIB:../DateTime-TimeZone-%{DTTimeZone_version}/blib/lib
export PERLLIB export PERLLIB
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" %{__perl} Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
make %{?_smp_mflags} ./Build
cd - cd -
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
cd DateTime-Locale-%{DTLocale_version} for d in DateTime-Locale-%{DTLocale_version} \
./Build install destdir=$RPM_BUILD_ROOT DateTime-TimeZone-%{DTTimeZone_version} \
cd - DateTime-%{DT_version}; do
cd $d
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
cd -
done
cd DateTime-TimeZone-%{DTTimeZone_version}
./Build install destdir=$RPM_BUILD_ROOT
cd -
cd DateTime-%{version}
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
cd -
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \; find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; find $RPM_BUILD_ROOT -depth -type d -empty -exec rmdir {} \;
%{_fixperms} $RPM_BUILD_ROOT/* %{_fixperms} $RPM_BUILD_ROOT/*
# Move documentation into bundle area # Move documentation into bundle area
mkdir DT::Locale DT::TimeZone mkdir DT::Locale DT::TimeZone
mv DateTime-%{version}/{CREDITS,Changes,LICENSE,README,TODO} . mv DateTime-%{DT_version}/{CREDITS,Changes,LICENSE,README,TODO} .
mv DateTime-Locale-%{DTLocale_version}/{Changes,LICENSE.cldr} DT::Locale mv DateTime-Locale-%{DTLocale_version}/{Changes,LICENSE.cldr} DT::Locale
mv DateTime-TimeZone-%{DTTimeZone_version}/{Changes,README} DT::TimeZone mv DateTime-TimeZone-%{DTTimeZone_version}/{Changes,README} DT::TimeZone
%check %check
# Have to use PERL5LIB rather than PERLLIB here because the test scripts # Have to use PERL5LIB rather than PERLLIB here because the test scripts
# clobber PERLLIB # clobber PERLLIB
PERL5LIB=$(pwd)/DateTime-%{version}/blib/arch:$(pwd)/DateTime-%{version}/blib/lib 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-Locale-%{DTLocale_version}/blib/lib
PERL5LIB=$PERL5LIB:$(pwd)/DateTime-TimeZone-%{DTTimeZone_version}/blib/lib PERL5LIB=$PERL5LIB:$(pwd)/DateTime-TimeZone-%{DTTimeZone_version}/blib/lib
export PERL5LIB export PERL5LIB
@ -123,18 +116,16 @@ export PERL5LIB
IS_MAINTAINER=1 IS_MAINTAINER=1
export IS_MAINTAINER export IS_MAINTAINER
cd DateTime-Locale-%{DTLocale_version} for d in DateTime-Locale-%{DTLocale_version} \
./Build test DateTime-TimeZone-%{DTTimeZone_version} \
cd - DateTime-%{DT_version}; do
cd $d
cd DateTime-TimeZone-%{DTTimeZone_version} ./Build test
./Build test cd -
cd - done
make -C DateTime-%{version} test
%clean %clean
rm -rf $RPM_BUILD_ROOT %{__perl_requires} %{__perl_provides} rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
@ -148,6 +139,14 @@ rm -rf $RPM_BUILD_ROOT %{__perl_requires} %{__perl_provides}
%{perl_vendorarch}/DateTime*.pm %{perl_vendorarch}/DateTime*.pm
%changelog %changelog
* Fri Jan 15 2010 Stepan Kasal <skasal@redhat.com> - 1:0.5300-1
- new upstream version
- use Build.PL as Makefile.PL no longer exists
- use iconv to recode to utf-8, not a patch
- update BuildRequires
- drop Provides: perl(DateTime::TimeZoneCatalog), it is no longer there
- use filtering macros
* Mon Dec 7 2009 Stepan Kasal <skasal@redhat.com> - 1:0.4501-4 * Mon Dec 7 2009 Stepan Kasal <skasal@redhat.com> - 1:0.4501-4
- rebuild against perl 5.10.1 - rebuild against perl 5.10.1

View File

@ -1,3 +1,3 @@
890270f12eb4eb07dc1ddf8b26794ffe DateTime-0.4501.tar.gz bc2db48557d9520ad5095895daa1cb0b DateTime-0.53.tar.gz
2f40350ef1c697f1bc402220824f6a7a DateTime-Locale-0.42.tar.gz f2e4ba9f2de67d2296c92da2e7c8b27d DateTime-Locale-0.44.tar.gz
bbd718672009ea7b533767798a9bad46 DateTime-TimeZone-0.8301.tar.gz 5ea91e005828226e234d5fd7dbf6f894 DateTime-TimeZone-1.08.tar.gz