#
# Conditional build:
%bcond_without tests # perform "make test"
#
%include /usr/lib/rpm/macros.perl
%define pdir DateTime
Summary: DateTime - representation of date/time combinations
Summary(pl.UTF-8): DateTime - reprezentacja kombinacji daty i czasu
Name: perl-DateTime
Version: 0.36
Release: 2
Epoch: 1
# same as perl
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{version}.tar.gz
# Source0-md5: 04a18d055011e34272d9b892b9634c68
URL: http://datetime.perl.org/
%if %{with tests}
#BuildRequires: perl-DateTime-Format-ICal # circular dependencies are no-no
#BuildRequires: perl-DateTime-Format-Strptime >= 1.0400
BuildRequires: perl-DateTime-Locale >= 0.34
BuildRequires: perl-DateTime-TimeZone >= 1:0.38
BuildRequires: perl-Params-Validate >= 0.76
%endif
BuildRequires: perl-devel >= 1:5.8.0
BuildRequires: rpm-perlprov >= 4.1-13
Requires: perl-base >= 1:5.8.7-3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%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 . The DateTime site has a FAQ
which may help answer many "how do I do X?" questions. The FAQ is at
.
%description -l pl.UTF-8
DateTime to klasa do reprezentowania kombinacji daty i czasu, będąca
częścią perlowego projektu DateTime. Szczegóły dotyczące tego projektu
można znaleźć pod adresem . Serwis ten ma
swoje FAQ, gdzie można znaleźć odpowiedzi na wiele pytań - dostępne
pod .
%prep
%setup -q -n %{pdir}-%{version}
%build
%{__perl} Makefile.PL \
INSTALLDIRS=vendor
%{__make} \
CC="%{__cc}" \
OPTIMIZE="%{rpmcflags}"
%{?with_tests:%{__make} test}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{perl_vendorlib}/DateTime/{Event,Format}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc Changes README CREDITS TODO leaptab.txt
%{perl_vendorlib}/DateTime/*
%{perl_vendorarch}/*.pm
%{perl_vendorarch}/DateTime/*.pm
%dir %{perl_vendorarch}/auto/DateTime
%attr(755,root,root) %{perl_vendorarch}/auto/DateTime/DateTime.so
%{_mandir}/man3/*