]> git.pld-linux.org Git - packages/perl-Devel-Hide.git/blob - perl-Devel-Hide.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Devel-Hide.git] / perl-Devel-Hide.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define pdir    Devel
6 %define pnam    Hide
7 Summary:        Devel::Hide - Forces the unavailability of specified Perl modules (for testing)
8 #Summary(pl.UTF-8):
9 Name:           perl-Devel-Hide
10 Version:        0.0008
11 Release:        1
12 # same as perl
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:  3b38c60feed1e922093f5f68dd6d5c20
17 URL:            http://search.cpan.org/dist/Devel-Hide/
18 BuildRequires:  perl-devel >= 1:5.8.0
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 %if %{with tests}
21 %endif
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 Given a list of Perl modules/filenames, this module makes require and
27 use statements fail (no matter the specified files/modules are
28 installed or not).
29
30 They die with a message like:
31
32 Can't locate Module/ToHide.pm (hidden)
33
34 The original intent of this module is to allow Perl developers to test
35 for alternative behavior when some modules are not available. In a
36 Perl installation, where many modules are already installed, there is
37 a chance to screw things up because you take for granted things that
38 may not be there in other machines.
39
40 For example, to test if your distribution does the right thing when a
41 module is missing, you can do
42
43 # %description -l pl.UTF-8
44
45 %prep
46 %setup -q -n %{pdir}-%{pnam}-%{version}
47
48 %build
49 %{__perl} Makefile.PL \
50         INSTALLDIRS=vendor
51 %{__make}
52
53 %{?with_tests:%{__make} test}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57
58 %{__make} pure_install \
59         DESTDIR=$RPM_BUILD_ROOT
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %files
65 %defattr(644,root,root,755)
66 %doc Changes README
67 %{perl_vendorlib}/Devel/*.pm
68 %{_mandir}/man3/*
This page took 0.074784 seconds and 4 git commands to generate.