3 %bcond_without tests # do not perform "make test"
4 %bcond_with libresolv # link against libresolv (creates architecture-dependent package)
6 %include /usr/lib/rpm/macros.perl
9 Summary: Net::DNS - Perl interface to the DNS resolver
10 Summary(pl): Net::DNS - interfejs perlowy do resolvera DNS
15 License: GPL v1+ or Artistic
16 Group: Development/Languages/Perl
17 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
18 # Source0-md5: 035e3ec9156fd73ca8a52308ebc5307c
19 BuildRequires: perl-devel >= 1:5.8.0
21 BuildRequires: perl-Digest-MD5 >= 2.12
22 BuildRequires: perl-Digest-HMAC >= 1.00
23 BuildRequires: perl-MIME-Base64 >= 2.11
24 BuildRequires: perl-Net-IP >= 1.20
25 BuildRequires: perl-Test-Simple >= 0.18
26 BuildRequires: perl-Test-Pod >= 0.95
28 BuildRequires: rpm-perlprov >= 4.1-13
29 %if !%{with libresolv}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Net::DNS is a DNS resolver implemented in Perl. It allows the
36 programmer to perform nearly any type of DNS query from a Perl script.
39 Net::DNS jest resolverem DNS, zaimplementowanym w Perlu. Pozwala
40 programi¶cie na wykonanie niemal ka¿dego typu zapytania DNS ze skryptu
44 %setup -q -n %{pdir}-%{pnam}-%{version}
47 %{__perl} Makefile.PL </dev/null \
48 %{?with_libresolv: --xs} \
49 %{!?with_libresolv: --no-xs} \
53 %{?with_libresolv: OPTIMIZE="%{rpmcflags}"}
55 %{?with_tests:%{__make} test}
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
62 DESTDIR=$RPM_BUILD_ROOT
63 install demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
64 cp -a contrib $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
66 # get rid of pod documentation
68 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Net/DNS/*.pod
70 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/*.pod
74 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
78 %doc Changes README TODO
80 %{perl_vendorarch}/Net/DNS.pm
81 %{perl_vendorarch}/Net/DNS
82 %{perl_vendorarch}/auto/Net/DNS/DNS.bs
83 %attr(755,root,root) %{perl_vendorarch}/auto/Net/DNS/DNS.so
85 %{perl_vendorlib}/Net/DNS.pm
86 %{perl_vendorlib}/Net/DNS
90 %{_examplesdir}/%{name}-%{version}