]> git.pld-linux.org Git - packages/perl-Net-DNS.git/blob - perl-Net-DNS.spec
- release 2 (by relup.sh)
[packages/perl-Net-DNS.git] / perl-Net-DNS.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # 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.83
13 Release:        2
14 # same as perl
15 License:        GPL v1+ or Artistic
16 Group:          Development/Languages/Perl
17 Source0:        http://www.cpan.org/modules/by-module/Net/%{pdir}-%{pnam}-%{version}.tar.gz
18 # Source0-md5:  f1d48107ff6b366479ad035783486d7a
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.01
26 BuildRequires:  perl-Digest-MD5 >= 2.13
27 BuildRequires:  perl-Digest-SHA >= 5.23
28 BuildRequires:  perl-IO-Socket-INET6 >= 2.51
29 BuildRequires:  perl-MIME-Base64 >= 2.11
30 BuildRequires:  perl-Test-Pod >= 0.95
31 BuildRequires:  perl-Test-Simple >= 0.52
32 %endif
33 BuildRequires:  rpm-perlprov >= 4.1-13
34 Requires:       perl-Digest-HMAC >= 1.01
35 Requires:       perl-Digest-MD5 >= 2.13
36 Requires:       perl-Digest-SHA >= 5.23
37 Requires:       perl-MIME-Base64 >= 2.11
38 # not autodetected
39 Provides:       perl(Net::DNS::DomainName1035) = 964
40 Provides:       perl(Net::DNS::DomainName2535) = 964
41 %if %{without libresolv}
42 BuildArch:      noarch
43 %endif
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         %{!?with_libresolv:--no-xs} \
64         --no-online-tests \
65         INSTALLDIRS=vendor
66 %{__make} \
67         CC="%{__cc}" \
68         %{?with_libresolv:OPTIMIZE="%{rpmcflags}"}
69
70 %{?with_tests:%{__make} test}
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
75 install -d $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/Resolver
76
77 %{__make} pure_install \
78         DESTDIR=$RPM_BUILD_ROOT
79 cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
80 cp -a contrib $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
81
82 # get rid of pod documentation
83 %if %{with libresolv}
84 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Net/DNS/*.pod
85 %else
86 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/*.pod
87 %endif
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %files
93 %defattr(644,root,root,755)
94 %doc Changes README TODO
95 %{perl_vendorlib}/Net/DNS
96 %if %{with libresolv}
97 %{perl_vendorarch}/Net/DNS.pm
98 %{perl_vendorarch}/Net/DNS
99 %dir %{perl_vendorarch}/auto/Net/DNS
100 %attr(755,root,root) %{perl_vendorarch}/auto/Net/DNS/DNS.so
101 %else
102 %{perl_vendorlib}/Net/DNS.pm
103 %endif
104
105 %{_mandir}/man3/*
106 %{_examplesdir}/%{name}-%{version}
This page took 0.064159 seconds and 3 git commands to generate.