]> git.pld-linux.org Git - packages/perl-Test-MockModule.git/blob - perl-Test-MockModule.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Test-MockModule.git] / perl-Test-MockModule.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    Test
6 %define         pnam    MockModule
7 Summary:        Test::MockModule - Override subroutines in a module for unit testing
8 #Summary(pl.UTF-8):     
9 Name:           perl-Test-MockModule
10 Version:        0.05
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/Test/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5:  1b013aeeb221f83e7f325a2f98169296
17 URL:            http://search.cpan.org/dist/Test-MockModule/
18 BuildRequires:  perl-devel >= 1:5.8.0
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Test::MockModule lets you temporarily redefine subroutines in other
25 packages for the purposes of unit testing.
26
27 A Test::MockModule object is set up to mock subroutines for a given
28 module. The object remembers the original subroutine so it can be
29 easily restored. This happens automatically when all MockModule
30 objects for the given module go out of scope, or when you unmock() the
31 subroutine.
32
33 # %description -l pl.UTF-8
34 # TODO
35
36 %prep
37 %setup -q -n %{pdir}-%{pnam}-%{version}
38
39 %build
40 %{__perl} Makefile.PL \
41         INSTALLDIRS=vendor
42 %{__make}
43
44 %{?with_tests:%{__make} test}
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48
49 %{__make} pure_install \
50         DESTDIR=$RPM_BUILD_ROOT
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %files
56 %defattr(644,root,root,755)
57 %doc Changes README
58 %{perl_vendorlib}/Test/*.pm
59 %{_mandir}/man3/*
This page took 0.129332 seconds and 3 git commands to generate.