]> git.pld-linux.org Git - SPECS.git/blob - perl-DateTime.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / perl-DateTime.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # perform "make test"
4 %bcond_with     tests_i18n      # tests with localization (requires some DateTime::Locale language resources)
5
6 %define         pdir    DateTime
7 Summary:        DateTime - representation of date/time combinations
8 Summary(pl.UTF-8):      DateTime - reprezentacja kombinacji daty i czasu
9 Name:           perl-DateTime
10 Version:        1.54
11 Release:        1
12 Epoch:          2
13 License:        Artistic v2.0
14 Group:          Development/Languages/Perl
15 Source0:        http://www.cpan.org/modules/by-module/DateTime/%{pdir}-%{version}.tar.gz
16 # Source0-md5:  5b90d9b26741da2627b8d002d8796f95
17 URL:            https://metacpan.org/release/DateTime
18 BuildRequires:  perl(Pod::Man) >= 1.14
19 BuildRequires:  perl-Dist-CheckConflicts >= 0.02
20 BuildRequires:  perl-devel >= 1:5.8.4
21 BuildRequires:  rpm-perlprov >= 4.1-13
22 BuildRequires:  rpmbuild(macros) >= 1.745
23 %if %{with tests}
24 BuildRequires:  perl-CPAN-Meta-Check >= 0.011
25 BuildRequires:  perl-CPAN-Meta-Requirements
26 BuildRequires:  perl-DateTime-Format-Mail >= 0.402
27 BuildRequires:  perl-DateTime-Format-Strptime >= 1.2000
28 BuildRequires:  perl-DateTime-Locale >= 1.06
29 BuildRequires:  perl-DateTime-TimeZone >= 3:2.44
30 BuildRequires:  perl-JSON-PP >= 2.27300
31 BuildRequires:  perl-Math-Round
32 BuildRequires:  perl-Params-ValidationCompiler >= 0.26
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
40 BuildRequires:  perl-namespace-autoclean >= 0.19
41 %endif
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
45 BuildConflicts: perl-DateTime-Format-Mail <= 0.402
46 Requires:       perl-base >= 1:5.8.7-3
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 DateTime is a class for the representation of date/time combinations,
51 and is part of the Perl DateTime project. For details on this project
52 please see <http://datetime.perl.org/>. The DateTime site has a FAQ
53 which may help answer many "how do I do X?" questions. The FAQ is at
54 <http://datetime.perl.org/faq.html>.
55
56 %description -l pl.UTF-8
57 DateTime to klasa do reprezentowania kombinacji daty i czasu, będąca
58 częścią perlowego projektu DateTime. Szczegóły dotyczące tego projektu
59 można znaleźć pod adresem <http://datetime.perl.org/>. Serwis ten ma
60 swoje FAQ, gdzie można znaleźć odpowiedzi na wiele pytań - dostępne
61 pod <http://datetime.perl.org/faq.html>.
62
63 %prep
64 %setup -q -n %{pdir}-%{version}
65
66 %if %{with tests} && %{without tests_i18n}
67 %{__sed} -i -e "/^test_strftime_for_locale( '\(de\|it\)'/d" t/13strftime.t
68 %{__sed} -i -e "/locale.*'de'/ s/'de'/'en-US'/" t/23storable.t
69 %{__rm} t/14locale.t t/41cldr-format.t
70 %endif
71
72 %build
73 %{__perl} Makefile.PL \
74         INSTALLDIRS=vendor
75 %{__make}
76
77 %{?with_tests:%{__make} test}
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81
82 %{__make} install \
83         DESTDIR=$RPM_BUILD_ROOT
84
85 # for noarch DateTime::* modules
86 install -d $RPM_BUILD_ROOT%{perl_vendorlib}/DateTime/{Event,Format}
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %files
92 %defattr(644,root,root,755)
93 %doc CREDITS Changes TODO leaptab.txt
94 %{perl_vendorarch}/DateTime.pm
95 %{perl_vendorarch}/DateTime/*.pm
96 %dir %{perl_vendorlib}/DateTime/Event
97 %dir %{perl_vendorlib}/DateTime/Format
98 %dir %{perl_vendorarch}/auto/DateTime
99 %attr(755,root,root) %{perl_vendorarch}/auto/DateTime/DateTime.so
100 %{_mandir}/man3/DateTime*.3pm*
This page took 0.061299 seconds and 3 git commands to generate.