]>
Commit | Line | Data |
---|---|---|
2c347c46 AM |
1 | # |
2 | # Conditional build: | |
1732835d | 3 | %bcond_without tests # unit tests |
2c347c46 AM |
4 | # |
5 | %define pdir Devel | |
6 | %define pnam OverrideGlobalRequire | |
1732835d JB |
7 | Summary: Devel::OverrideGlobalRequire - override CORE::GLOBAL::require safely |
8 | Summary(pl.UTF-8): Devel::OverrideGlobalRequire - nadpisywanie bezpieczeństwa CORE::GLOBAL::require | |
2c347c46 AM |
9 | Name: perl-Devel-OverrideGlobalRequire |
10 | Version: 0.001 | |
11 | Release: 1 | |
1732835d | 12 | # same as perl 5 |
2c347c46 AM |
13 | License: GPL v1+ or Artistic |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/Devel/%{pdir}-%{pnam}-%{version}.tar.gz | |
16 | # Source0-md5: 9cc9b7c3e39629d2f3ae22d347c29f1a | |
1732835d JB |
17 | URL: https://metacpan.org/dist/Devel-OverrideGlobalRequire |
18 | BuildRequires: perl-ExtUtils-MakeMaker >= 6.30 | |
2c347c46 AM |
19 | BuildRequires: perl-devel >= 1:5.8.0 |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
1732835d | 21 | BuildRequires: rpmbuild(macros) >= 1.745 |
2c347c46 | 22 | %if %{with tests} |
1732835d | 23 | BuildRequires: perl-Scalar-List-Utils |
2c347c46 AM |
24 | %endif |
25 | BuildArch: noarch | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | This module overrides CORE::GLOBAL::require with a code reference in a | |
30 | way that plays nice with any existing overloading and ensures the | |
31 | right calling package is in scope. | |
32 | ||
1732835d JB |
33 | %description -l pl.UTF-8 |
34 | Ten moduł nadpisuje CORE::GLOBAL::require referencją do kodu w taki | |
35 | sposób, aby działał z dowolnym istniejącym nadpisaniem i zapewnia, że | |
36 | właściwy pakiet wywołujący jest w kontekście. | |
37 | ||
2c347c46 AM |
38 | %prep |
39 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
40 | ||
41 | %build | |
42 | %{__perl} Makefile.PL \ | |
43 | INSTALLDIRS=vendor | |
44 | %{__make} | |
45 | ||
46 | %{?with_tests:%{__make} test} | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %{__make} pure_install \ | |
52 | DESTDIR=$RPM_BUILD_ROOT | |
53 | ||
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %files | |
58 | %defattr(644,root,root,755) | |
1732835d JB |
59 | %doc Changes |
60 | %{perl_vendorlib}/Devel/OverrideGlobalRequire.pm | |
61 | %{_mandir}/man3/Devel::OverrideGlobalRequire.3pm* |