]> git.pld-linux.org Git - packages/perl-Net-DNS.git/blob - perl-Net-DNS.spec
- up to 0.62 (sec bug not fixed for long time; doesn't look serious; cve number point...
[packages/perl-Net-DNS.git] / perl-Net-DNS.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 %bcond_without  libresolv       # link against libresolv (creates architecture-dependent package)
5 #
6 %include        /usr/lib/rpm/macros.perl
7 %define         pdir    Net
8 %define         pnam    DNS
9 Summary:        Net::DNS - Perl interface to the DNS resolver
10 Summary(pl.UTF-8):      Net::DNS - interfejs perlowy do resolvera DNS
11 Name:           perl-Net-DNS
12 Version:        0.62
13 Release:        1
14 # same as perl
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:  91366517392283a909ee37d3c1c64904
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
24 BuildRequires:  perl-Digest-HMAC >= 1.00
25 BuildRequires:  perl-Digest-MD5 >= 2.12
26 BuildRequires:  perl-IO-Socket-INET6 >= 2.51
27 BuildRequires:  perl-MIME-Base64 >= 2.11
28 BuildRequires:  perl-Net-IP >= 1.20
29 BuildRequires:  perl-Test-Pod >= 0.95
30 %endif
31 BuildRequires:  rpm-perlprov >= 4.1-13
32 # https://rt.cpan.org/Public/Bug/Display.html?id=30316:
33 # BuildRequires:        FIXME(CVE-unknown)
34 %if !%{with libresolv}
35 BuildArch:      noarch
36 %endif
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Net::DNS is a DNS resolver implemented in Perl. It allows the
41 programmer to perform nearly any type of DNS query from a Perl script.
42
43 %description -l pl.UTF-8
44 Net::DNS jest resolverem DNS, zaimplementowanym w Perlu. Pozwala
45 programiście na wykonanie niemal każdego typu zapytania DNS ze skryptu
46 Perla.
47
48 %prep
49 %setup -q -n %{pdir}-%{pnam}-%{version}
50
51 %{__sed} -i -e 's#/''usr/local/bin/perl#/''usr/bin/perl#' demo/* contrib/*
52
53 %build
54 %{__perl} Makefile.PL </dev/null \
55         %{!?with_libresolv:--no-xs} \
56         --no-online-tests \
57         INSTALLDIRS=vendor
58 %{__make} \
59         CC="%{__cc}" \
60         %{?with_libresolv:OPTIMIZE="%{rpmcflags}"}
61
62 %{?with_tests:%{__make} test}
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
67 install -d $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/Resolver
68
69 %{__make} pure_install \
70         DESTDIR=$RPM_BUILD_ROOT
71 cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72 cp -a contrib $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73
74 # get rid of pod documentation
75 %if %{with libresolv}
76 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Net/DNS/*.pod
77 %else
78 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/*.pod
79 %endif
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %files
85 %defattr(644,root,root,755)
86 %doc Changes README TODO
87 %{perl_vendorlib}/Net/DNS
88 %if %{with libresolv}
89 %{perl_vendorarch}/Net/DNS.pm
90 %{perl_vendorarch}/Net/DNS
91 %{perl_vendorarch}/auto/Net/DNS/DNS.bs
92 %dir %{perl_vendorarch}/auto/Net/DNS
93 %attr(755,root,root) %{perl_vendorarch}/auto/Net/DNS/DNS.so
94 %else
95 %{perl_vendorlib}/Net/DNS.pm
96 %endif
97
98 %{_mandir}/man3/*
99 %{_examplesdir}/%{name}-%{version}
This page took 0.033925 seconds and 3 git commands to generate.