]>
Commit | Line | Data |
---|---|---|
f33aabc6 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
247249cd | 4 | |
f33aabc6 | 5 | %define pdir HTTP |
6 | %define pnam Exception | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | Summary: HTTP::Exception - throw HTTP-Errors as (Exception::Class-) Exceptions | |
f33aabc6 | 9 | Name: perl-HTTP-Exception |
10 | Version: 0.03001 | |
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/HTTP/%{pdir}-%{pnam}-%{version}.tar.gz | |
16 | # Source0-md5: 3541f70932c99c0c44a1d0666bfec151 | |
247249cd | 17 | URL: http://search.cpan.org/dist/HTTP-Exception/ |
f33aabc6 | 18 | BuildRequires: perl-Module-Build |
19 | BuildRequires: perl-devel >= 1:5.8.0 | |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
21 | %if %{with tests} | |
22 | BuildRequires: perl-Exception-Class >= 1.29 | |
23 | BuildRequires: perl-HTTP-Message >= 5.817 | |
24 | BuildRequires: perl-Test-Exception >= 0.29 | |
25 | %endif | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | Every HTTP::Exception is a Exception::Class - Class. So the same | |
31 | mechanisms apply as with Exception::Class-classes. In fact have a look | |
32 | at Exception::Class' docs for more general information on exceptions | |
33 | and Exception::Class::Base for information on what methods a caught | |
34 | exception also has. | |
35 | ||
f33aabc6 | 36 | %prep |
37 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
38 | ||
39 | %build | |
40 | %{__perl} Build.PL \ | |
41 | destdir=$RPM_BUILD_ROOT \ | |
42 | installdirs=vendor | |
43 | ./Build | |
44 | ||
45 | %{?with_tests:./Build test} | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | ./Build install | |
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}/HTTP/*.pm | |
59 | %{perl_vendorlib}/HTTP/Exception | |
60 | %{_mandir}/man3/* |