]>
Commit | Line | Data |
---|---|---|
4c84c59f MP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
dc9995d3 | 4 | |
8fc450e6 | 5 | %define pdir DateTime |
6 | %define pnam Locale | |
dc9995d3 | 7 | %include /usr/lib/rpm/macros.perl |
bf28c9b1 | 8 | Summary: DateTime::Locale - localization support for DateTime |
e755f763 | 9 | Summary(pl.UTF-8): DateTime::Locale - wsparcie międzynarodowe dla DateTime |
4c84c59f | 10 | Name: perl-DateTime-Locale |
fc3e16da | 11 | Version: 1.22 |
18d64bdc | 12 | Release: 1 |
b8c9bd59 | 13 | License: GPL v1+ or Artistic (parts on ICU License) |
4c84c59f | 14 | Group: Development/Languages/Perl |
682d330a | 15 | Source0: http://www.cpan.org/modules/by-module/DateTime/DROLSKY/%{pdir}-%{pnam}-%{version}.tar.gz |
fc3e16da | 16 | # Source0-md5: b629fcaec2b4c900034a74602783a7f5 |
bbc10c45 | 17 | URL: http://search.cpan.org/dist/DateTime-Locale/ |
1ddc8349 | 18 | BuildRequires: perl-Dist-CheckConflicts >= 0.02 |
fc3e16da | 19 | BuildRequires: perl-File-ShareDir-Install >= 0.03 |
1ddc8349 | 20 | BuildRequires: perl-devel >= 1:5.8.4 |
4c84c59f | 21 | BuildRequires: rpm-perlprov >= 4.1-13 |
b16dc7ed | 22 | %if %{with tests} |
1ddc8349 JB |
23 | BuildRequires: perl-CPAN-Meta-Check >= 0.011 |
24 | BuildRequires: perl-CPAN-Meta-Requirements | |
fc3e16da | 25 | BuildRequires: perl-IPC-System-Simple |
1ddc8349 | 26 | BuildRequires: perl-Params-ValidationCompiler >= 0.13 |
18d64bdc | 27 | BuildRequires: perl-Scalar-List-Utils >= 1.45 |
1ddc8349 | 28 | BuildRequires: perl-Specio |
fc3e16da | 29 | BuildRequires: perl-Storable |
1ddc8349 | 30 | BuildRequires: perl-Test-Fatal |
fc3e16da | 31 | BuildRequires: perl-Test-File-ShareDir |
1ddc8349 JB |
32 | BuildRequires: perl-Test-Pod >= 1.41 |
33 | BuildRequires: perl-Test-Simple >= 0.96 | |
34 | BuildRequires: perl-Test-Requires | |
35 | BuildRequires: perl-Test-Warnings | |
36 | BuildRequires: perl-namespace-autoclean >= 0.19 | |
b16dc7ed | 37 | %endif |
dc9995d3 | 38 | BuildConflicts: perl-DateTime-Format-Strptime <= 1.1000 |
4c84c59f MP |
39 | BuildArch: noarch |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
1ddc8349 | 42 | %define _noautoreq_perl DateTime::Locale.*) |
d6916c49 | 43 | |
4c84c59f MP |
44 | %description |
45 | This package contains DateTime::Locale, an factory for the various | |
906b1623 | 46 | locale subclasses. It also provides some functions for getting |
4c84c59f MP |
47 | information on available locales. |
48 | ||
8fd338af JR |
49 | %description -l pl.UTF-8 |
50 | Pakiet ten zawiera DateTime::Locale, źródło różnych klas związanych z | |
51 | umiędzynarodowieniem. Udostępnia również pewne funkcje służące do | |
52 | pobierania informacji o dostępnych locale. | |
bf28c9b1 | 53 | |
4c84c59f MP |
54 | %prep |
55 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
56 | ||
57 | %build | |
18d64bdc AM |
58 | %{__perl} Makefile.PL \ |
59 | INSTALLDIRS=vendor | |
60 | %{__make} | |
4c84c59f | 61 | |
18d64bdc | 62 | %{?with_tests:%{__make} test} |
4c84c59f MP |
63 | |
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
682d330a | 66 | |
18d64bdc AM |
67 | %{__make} install \ |
68 | DESTDIR=$RPM_BUILD_ROOT | |
4c84c59f | 69 | |
fc3e16da JB |
70 | for f in $RPM_BUILD_ROOT%{perl_vendorlib}/auto/share/dist/DateTime-Locale/*.pl ; do |
71 | basename=$(basename $f .pl) | |
72 | lang=$(echo $basename | sed -e 's/-POSIX//; s/-VALENCIA//; s/-[0-9][0-9][0-9]//; s/-[A-Z][a-z][a-z][a-z]//; s/^\([a-z][a-z][a-z]\?\)-\([A-Z][A-Z]\)$/\1_\2/') | |
73 | echo "%lang($lang) %{perl_vendorlib}/auto/share/dist/DateTime-Locale/${basename}.pl" | |
74 | done > %{name}.lang | |
75 | ||
4c84c59f MP |
76 | %clean |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
fc3e16da | 79 | %files -f %{name}.lang |
4c84c59f | 80 | %defattr(644,root,root,755) |
fc3e16da | 81 | %doc Changes LICENSE.cldr README.md |
682d330a | 82 | %{perl_vendorlib}/DateTime/Locale.pm |
682d330a | 83 | %{perl_vendorlib}/DateTime/Locale |
fc3e16da | 84 | %dir %{perl_vendorlib}/auto/share/dist/DateTime-Locale |
682d330a | 85 | %{_mandir}/man3/DateTime::Locale*.3pm* |