]> git.pld-linux.org Git - packages/perl-Net-DNS.git/blob - perl-Net-DNS.spec
- up to 0.67
[packages/perl-Net-DNS.git] / perl-Net-DNS.spec
1 #
2 # Conditional build:
3 %bcond_with     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.67
13 Release:        1
14 # same as perl
15 License:        GPL v1+ or Artistic
16 Group:          Development/Languages/Perl
17 Source0:        http://search.cpan.org/CPAN/authors/id/O/OL/OLAF/%{pdir}-%{pnam}-%{version}.tar.gz
18 # Source0-md5:  8caf473b6f74cae38ee18c162041a5db
19 Patch0:         %{name}-ignore-resolv_conf-open-errors.patch
20 URL:            http://search.cpan.org/dist/Net-DNS/
21 BuildRequires:  perl-devel >= 1:5.8.0
22 BuildRequires:  sed >= 4.0
23 %if %{with tests}
24 BuildRequires:  perl-Digest-BubbleBabble
25 BuildRequires:  perl-Digest-HMAC >= 1.00
26 BuildRequires:  perl-Digest-MD5 >= 2.12
27 BuildRequires:  perl-IO-Socket-INET6 >= 2.51
28 BuildRequires:  perl-MIME-Base64 >= 2.11
29 BuildRequires:  perl-Net-IP >= 1.20
30 BuildRequires:  perl-Test-Pod >= 0.95
31 %endif
32 BuildRequires:  rpm-perlprov >= 4.1-13
33 # https://rt.cpan.org/Public/Bug/Display.html?id=30316:
34 # BuildRequires:        FIXME(CVE-unknown)
35 %if !%{with libresolv}
36 BuildArch:      noarch
37 %endif
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Net::DNS is a DNS resolver implemented in Perl. It allows the
42 programmer to perform nearly any type of DNS query from a Perl script.
43
44 %description -l pl.UTF-8
45 Net::DNS jest resolverem DNS, zaimplementowanym w Perlu. Pozwala
46 programiście na wykonanie niemal każdego typu zapytania DNS ze skryptu
47 Perla.
48
49 %prep
50 %setup -q -n %{pdir}-%{pnam}-%{version}
51 %patch0 -p1
52
53 %{__sed} -i -e 's#/''usr/local/bin/perl#/''usr/bin/perl#' demo/* contrib/*
54
55 %build
56 %{__perl} Makefile.PL </dev/null \
57         %{!?with_libresolv:--no-xs} \
58         --no-online-tests \
59         INSTALLDIRS=vendor
60 %{__make} \
61         CC="%{__cc}" \
62         %{?with_libresolv:OPTIMIZE="%{rpmcflags}"}
63
64 %{?with_tests:%{__make} test}
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
69 install -d $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/Resolver
70
71 %{__make} pure_install \
72         DESTDIR=$RPM_BUILD_ROOT
73 cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
74 cp -a contrib $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
75
76 # get rid of pod documentation
77 %if %{with libresolv}
78 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Net/DNS/*.pod
79 %else
80 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/*.pod
81 %endif
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %files
87 %defattr(644,root,root,755)
88 %doc Changes README TODO
89 %{perl_vendorlib}/Net/DNS
90 %if %{with libresolv}
91 %{perl_vendorarch}/Net/DNS.pm
92 %{perl_vendorarch}/Net/DNS
93 %{perl_vendorarch}/auto/Net/DNS/DNS.bs
94 %dir %{perl_vendorarch}/auto/Net/DNS
95 %attr(755,root,root) %{perl_vendorarch}/auto/Net/DNS/DNS.so
96 %else
97 %{perl_vendorlib}/Net/DNS.pm
98 %endif
99
100 %{_mandir}/man3/*
101 %{_examplesdir}/%{name}-%{version}
This page took 0.216481 seconds and 4 git commands to generate.