]> git.pld-linux.org Git - packages/perl-Test-Strict.git/blob - perl-Test-Strict.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Test-Strict.git] / perl-Test-Strict.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define pdir    Test
6 %define pnam    Strict
7 Summary:        Test::Strict - Check syntax, presence of use strict; and test coverage
8 Summary(pl.UTF-8):      Test::Strict - sprawdzanie składni, obecności "use strict" i pokrycia testami
9 Name:           perl-Test-Strict
10 Version:        0.37
11 Release:        1
12 # same as perl 5
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:  739d91c3404e341245ebd0a0081ddc31
17 URL:            http://search.cpan.org/dist/Test-Strict/
18 BuildRequires:  perl-devel >= 1:5.8.0
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 %if %{with tests}
21 BuildRequires:  perl-Devel-Cover >= 0.43
22 BuildRequires:  perl-Scalar-List-Utils
23 BuildRequires:  perl-Test-Pod >= 1.48
24 BuildRequires:  perl-Test-Pod-Coverage >= 1.10
25 %endif
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 The most basic test one can write is "does it compile?". This module
31 tests if the code compiles and play nice with Test::Simple modules.
32
33 Another good practice this module can test is to "use strict;" in all
34 perl files.
35
36 By setting a minimum test coverage through all_cover_ok(), a code
37 author can ensure his code is tested above a preset level of quality
38 throughout the development cycle.
39
40 Along with Test::Pod, this module can provide the first tests to setup
41 for a module author.
42
43 %description -l pl.UTF-8
44 Najbardziej podstawowym testem, który można napisać, to "czy to się
45 kompiluje?". Ten moduł sprawdza więc, czy kod się kompiluje i dobrze
46 współpracuje z modułami Test::Simple.
47
48 Inną dobrą praktyką, jaką może testować ten moduł, to czy wszystkie
49 pliki perlowe zawierają "use strict;".
50
51 Ustawiając minimalne pokrycie testami poprzez all_cover_ok(), autor
52 kodu może upewnić się, że jego kod jest testowany pod kątem
53 określonego poziomu jakości.
54
55 Wraz z Test::Pod ten moduł może zapewnić autorom modułów pierwsze
56 testy.
57
58 %prep
59 %setup -q -n %{pdir}-%{pnam}-%{version}
60
61 %build
62 %{__perl} Makefile.PL \
63         INSTALLDIRS=vendor
64 %{__make}
65
66 %{?with_tests:%{__make} test}
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70
71 %{__make} install \
72         DESTDIR=$RPM_BUILD_ROOT
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
78 %defattr(644,root,root,755)
79 %doc Changes README
80 %{perl_vendorlib}/Test/Strict.pm
81 %{_mandir}/man3/Test::Strict.3pm*
This page took 0.07656 seconds and 4 git commands to generate.