3 %bcond_without tests # do not perform "make test"
7 %include /usr/lib/rpm/macros.perl
8 Summary: namespace::clean - Keep imports and functions out of your namespace
9 Name: perl-namespace-clean
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/namespace/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 6c79f5de86159682deea09ee13311eaa
17 URL: http://search.cpan.org/dist/namespace-clean/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: perl(B::Hooks::EndOfScope)
22 BuildRequires: perl-Package-Stash >= 0.23
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 # Tie::ExtraHash is present in Tie/Hash.pm package
28 %define _noautoreq_perl Tie::ExtraHash
31 The namespace::clean pragma will remove all previously declared or
32 imported symbols at the end of the current package's compile cycle.
33 Functions called in the package itself will still be bound by their
34 name, but they won't show up as methods on your class or instances.
37 %setup -q -n %{pdir}-%{pnam}-%{version}
40 %{__perl} Makefile.PL \
45 %{?with_tests:%{__make} test}
48 rm -rf $RPM_BUILD_ROOT
50 %{__make} pure_install \
51 DESTDIR=$RPM_BUILD_ROOT
54 rm -rf $RPM_BUILD_ROOT
57 %defattr(644,root,root,755)
59 %dir %{perl_vendorlib}/namespace
60 %{perl_vendorlib}/namespace/clean.pm
61 %{perl_vendorlib}/namespace/clean
62 %{_mandir}/man3/namespace::clean.3pm*