]> git.pld-linux.org Git - packages/perl-Net-DNS.git/blob - perl-Net-DNS.spec
08ac71b70609791e3e1cf4a086eee539eef702c4
[packages/perl-Net-DNS.git] / perl-Net-DNS.spec
1 # TODO
2 # - pass CC
3 #
4 # Conditional build:
5 %bcond_without  tests           # do not perform "make test"
6 %bcond_without  libresolv       # link against libresolv (creates architecture-dependent package)
7 #
8 %include        /usr/lib/rpm/macros.perl
9 %define         pdir    Net
10 %define         pnam    DNS
11 Summary:        Net::DNS - Perl interface to the DNS resolver
12 Summary(pl):    Net::DNS - interfejs perlowy do resolvera DNS
13 Name:           perl-Net-DNS
14 Version:        0.53
15 Release:        3
16 # same as perl
17 License:        GPL v1+ or Artistic
18 Group:          Development/Languages/Perl
19 Source0:        http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
20 # Source0-md5:  404797359373d4df1a025458ab1415f7
21 URL:            http://search.cpan.org/dist/Net-DNS/
22 BuildRequires:  perl-devel >= 1:5.8.0
23 BuildRequires:  sed >= 4.0
24 %if %{with tests}
25 BuildRequires:  perl-Digest-BubbleBabble
26 BuildRequires:  perl-Digest-HMAC >= 1.00
27 BuildRequires:  perl-Digest-MD5 >= 2.12
28 BuildRequires:  perl-IO-Socket-INET6 >= 2.51
29 BuildRequires:  perl-MIME-Base64 >= 2.11
30 BuildRequires:  perl-Net-IP >= 1.20
31 BuildRequires:  perl-Test-Pod >= 0.95
32 %endif
33 BuildRequires:  rpm-perlprov >= 4.1-13
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
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         %{?with_libresolv:OPTIMIZE="%{rpmcflags}"}
60
61 %{?with_tests:%{__make} test}
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
66
67 %{__make} pure_install \
68         DESTDIR=$RPM_BUILD_ROOT
69 cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
70 cp -a contrib $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71
72 # get rid of pod documentation
73 %if %{with libresolv}
74 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Net/DNS/*.pod
75 %else
76 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/*.pod
77 %endif
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %files
83 %defattr(644,root,root,755)
84 %doc Changes README TODO
85 %if %{with libresolv}
86 %{perl_vendorarch}/Net/DNS.pm
87 %{perl_vendorarch}/Net/DNS
88 %{perl_vendorarch}/auto/Net/DNS/DNS.bs
89 %dir %{perl_vendorarch}/auto/Net/DNS
90 %attr(755,root,root) %{perl_vendorarch}/auto/Net/DNS/DNS.so
91 %else
92 %{perl_vendorlib}/Net/DNS.pm
93 %{perl_vendorlib}/Net/DNS
94 %endif
95
96 %{_mandir}/man3/*
97 %{_examplesdir}/%{name}-%{version}
This page took 0.10558 seconds and 3 git commands to generate.