]>
Commit | Line | Data |
---|---|---|
b9ef3c05 MP |
1 | # |
2 | # Conditional build: | |
0f7febff JB |
3 | %bcond_without tests # perform "make test" |
4 | %bcond_with tests_i18n # tests with localization (requires some DateTime::Locale language resources) | |
2fbfc652 | 5 | |
a38d9702 | 6 | %define pdir DateTime |
4865b32c | 7 | Summary: DateTime - representation of date/time combinations |
09c40355 | 8 | Summary(pl.UTF-8): DateTime - reprezentacja kombinacji daty i czasu |
b9ef3c05 | 9 | Name: perl-DateTime |
0856ed2a | 10 | Version: 1.52 |
33128fbc | 11 | Release: 2 |
6d9ba877 | 12 | Epoch: 2 |
e5a8deb6 | 13 | License: Artistic v2.0 |
b9ef3c05 | 14 | Group: Development/Languages/Perl |
1a4120bd | 15 | Source0: http://www.cpan.org/modules/by-module/DateTime/%{pdir}-%{version}.tar.gz |
0856ed2a JB |
16 | # Source0-md5: f18d180e2d7e5110f75e7a20955588f3 |
17 | URL: https://metacpan.org/release/DateTime | |
ad1ed8bf | 18 | BuildRequires: perl(Pod::Man) >= 1.14 |
e5a8deb6 | 19 | BuildRequires: perl-Dist-CheckConflicts >= 0.02 |
ad1ed8bf | 20 | BuildRequires: perl-ExtUtils-CBuilder |
e5a8deb6 | 21 | BuildRequires: perl-devel >= 1:5.8.4 |
ad1ed8bf | 22 | BuildRequires: rpm-perlprov >= 4.1-13 |
0856ed2a | 23 | BuildRequires: rpmbuild(macros) >= 1.745 |
cd0a14c2 | 24 | %if %{with tests} |
e5a8deb6 JB |
25 | BuildRequires: perl-CPAN-Meta-Check >= 0.011 |
26 | BuildRequires: perl-CPAN-Meta-Requirements | |
ba121f86 | 27 | BuildRequires: perl-DateTime-Format-Mail >= 0.402 |
2fbfc652 | 28 | BuildRequires: perl-DateTime-Format-Strptime >= 1.2000 |
e5a8deb6 JB |
29 | BuildRequires: perl-DateTime-Locale >= 1.06 |
30 | BuildRequires: perl-DateTime-TimeZone >= 3:2.02 | |
39ada8dd | 31 | BuildRequires: perl-Math-Round |
ba121f86 | 32 | BuildRequires: perl-Params-ValidationCompiler >= 0.26 |
e5a8deb6 JB |
33 | BuildRequires: perl-Scalar-List-Utils |
34 | BuildRequires: perl-Specio >= 0.18 | |
35 | BuildRequires: perl-Storable | |
36 | BuildRequires: perl-Test-Fatal | |
37 | BuildRequires: perl-Test-Simple >= 0.96 | |
38 | BuildRequires: perl-Test-Warnings >= 0.005 | |
39 | BuildRequires: perl-Try-Tiny | |
a5fe93bb | 40 | BuildRequires: perl-namespace-autoclean >= 0.19 |
cd0a14c2 | 41 | %endif |
0f7febff JB |
42 | %if %{with tests_i18n} && "%(ls /usr/share/perl5/vendor_perl/auto/share/dist/DateTime-Locale/{de,en-US-POSIX,fr,it}.pl >/dev/null 2>&1 ; echo $?)" != "0" |
43 | BuildRequires: perl-DateTime-Locale(with_locales:de;en-US;fr;it) | |
44 | %endif | |
dcc0fe62 | 45 | Requires: perl-base >= 1:5.8.7-3 |
b9ef3c05 MP |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
48 | %description | |
49 | DateTime is a class for the representation of date/time combinations, | |
50 | and is part of the Perl DateTime project. For details on this project | |
51 | please see <http://datetime.perl.org/>. The DateTime site has a FAQ | |
52 | which may help answer many "how do I do X?" questions. The FAQ is at | |
53 | <http://datetime.perl.org/faq.html>. | |
54 | ||
3e6af1e6 JR |
55 | %description -l pl.UTF-8 |
56 | DateTime to klasa do reprezentowania kombinacji daty i czasu, będąca | |
57 | częścią perlowego projektu DateTime. Szczegóły dotyczące tego projektu | |
58 | można znaleźć pod adresem <http://datetime.perl.org/>. Serwis ten ma | |
59 | swoje FAQ, gdzie można znaleźć odpowiedzi na wiele pytań - dostępne | |
4865b32c JB |
60 | pod <http://datetime.perl.org/faq.html>. |
61 | ||
b9ef3c05 MP |
62 | %prep |
63 | %setup -q -n %{pdir}-%{version} | |
64 | ||
0f7febff JB |
65 | %if %{with tests} && %{without tests_i18n} |
66 | %{__sed} -i -e "/^test_strftime_for_locale( '\(de\|it\)'/d" t/13strftime.t | |
67 | %{__sed} -i -e "/locale.*'de'/ s/'de'/'en-US'/" t/23storable.t | |
68 | %{__rm} t/14locale.t t/41cldr-format.t | |
69 | %endif | |
70 | ||
b9ef3c05 | 71 | %build |
a5fe93bb AM |
72 | %{__perl} Makefile.PL \ |
73 | INSTALLDIRS=vendor | |
74 | %{__make} | |
b9ef3c05 | 75 | |
a5fe93bb | 76 | %{?with_tests:%{__make} test} |
b9ef3c05 MP |
77 | |
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
a5fe93bb AM |
81 | %{__make} install \ |
82 | DESTDIR=$RPM_BUILD_ROOT | |
185e654c | 83 | |
ad1ed8bf | 84 | # for noarch DateTime::* modules |
b84684af | 85 | install -d $RPM_BUILD_ROOT%{perl_vendorlib}/DateTime/{Event,Format} |
b9ef3c05 MP |
86 | |
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %files | |
91 | %defattr(644,root,root,755) | |
185e654c | 92 | %doc CREDITS Changes TODO leaptab.txt |
ad1ed8bf JB |
93 | %dir %{perl_vendorlib}/DateTime/Event |
94 | %dir %{perl_vendorlib}/DateTime/Format | |
95 | %{perl_vendorarch}/DateTime.pm | |
b9ef3c05 | 96 | %{perl_vendorarch}/DateTime/*.pm |
5b3e6dc2 | 97 | %dir %{perl_vendorarch}/auto/DateTime |
b9ef3c05 | 98 | %attr(755,root,root) %{perl_vendorarch}/auto/DateTime/DateTime.so |
ad1ed8bf | 99 | %{_mandir}/man3/DateTime*.3pm* |