- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Net-DNS.git] / perl-Net-DNS.spec
1 # TODO: verify ignore-resolv_conf-open-errors patch (remove or update)
2 #
3 # Conditional build:
4 %bcond_with     tests           # perform "make test"
5 #
6 %define         pdir    Net
7 %define         pnam    DNS
8 Summary:        Net::DNS - Perl interface to the DNS resolver
9 Summary(pl.UTF-8):      Net::DNS - interfejs perlowy do resolvera DNS
10 Name:           perl-Net-DNS
11 Version:        1.21
12 Release:        1
13 # same as perl
14 License:        GPL v1+ or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://www.cpan.org/modules/by-module/Net/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5:  91e8593eb6eed41995e6edc567fb6fec
18 Patch0:         %{name}-ignore-resolv_conf-open-errors.patch
19 URL:            http://search.cpan.org/dist/Net-DNS/
20 BuildRequires:  perl-devel >= 1:5.8.0
21 BuildRequires:  sed >= 4.0
22 %if %{with tests}
23 BuildRequires:  perl-Digest-BubbleBabble >= 0.01
24 BuildRequires:  perl-Digest-HMAC >= 1.03
25 BuildRequires:  perl-Digest-MD5 >= 2.13
26 BuildRequires:  perl-Digest-SHA >= 5.23
27 BuildRequires:  perl-IO-Socket-INET6 >= 2.51
28 BuildRequires:  perl-MIME-Base64 >= 2.11
29 BuildRequires:  perl-Test-Pod >= 0.95
30 BuildRequires:  perl-Test-Simple >= 0.52
31 BuildRequires:  perl(Time::Local) >= 1.19
32 %endif
33 BuildRequires:  rpm-perlprov >= 4.1-13
34 Requires:       perl-Digest-HMAC >= 1.03
35 Requires:       perl-Digest-MD5 >= 2.13
36 Requires:       perl-Digest-SHA >= 5.23
37 Requires:       perl-MIME-Base64 >= 2.11
38 Requires:       perl(Time::Local) >= 1.19
39 # not autodetected
40 Provides:       perl(Net::DNS::DomainName1035) = 1456
41 Provides:       perl(Net::DNS::DomainName2535) = 1456
42 Conflicts:      perl-Net-DNS-SEC < 1.01
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 Net::DNS is a DNS resolver implemented in Perl. It allows the
48 programmer to perform nearly any type of DNS query from a Perl script.
49
50 %description -l pl.UTF-8
51 Net::DNS jest resolverem DNS, zaimplementowanym w Perlu. Pozwala
52 programiście na wykonanie niemal każdego typu zapytania DNS ze skryptu
53 Perla.
54
55 %prep
56 %setup -q -n %{pdir}-%{pnam}-%{version}
57 #patch0 -p1
58
59 %{__sed} -i -e 's#/''usr/local/bin/perl#/''usr/bin/perl#' demo/* contrib/*
60
61 %build
62 %{__perl} Makefile.PL </dev/null \
63         --no-online-tests \
64         INSTALLDIRS=vendor
65 %{__make}
66
67 %{?with_tests:%{__make} test}
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72
73 %{__make} pure_install \
74         DESTDIR=$RPM_BUILD_ROOT
75
76 cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
77 cp -a contrib $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
78
79 # get rid of pod documentation
80 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/*.pod
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %files
86 %defattr(644,root,root,755)
87 %doc Changes README
88 %{perl_vendorlib}/Net/DNS.pm
89 %{perl_vendorlib}/Net/DNS/*.pm
90 %{perl_vendorlib}/Net/DNS/RR
91 %{perl_vendorlib}/Net/DNS/Resolver
92 %{_mandir}/man3/Net::DNS*.3pm*
93 %{_examplesdir}/%{name}-%{version}
This page took 0.327404 seconds and 4 git commands to generate.