]> git.pld-linux.org Git - packages/perl-Net-DNS.git/blob - perl-Net-DNS.spec
- just fixed perl path for examples
[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):    Net::DNS - interfejs perlowy do resolvera DNS
11 Name:           perl-Net-DNS
12 Version:        0.53
13 Release:        3
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:  404797359373d4df1a025458ab1415f7
19 BuildRequires:  perl-devel >= 1:5.8.0
20 %if %{with tests}
21 BuildRequires:  perl-Digest-BubbleBabble
22 BuildRequires:  perl-Digest-HMAC >= 1.00
23 BuildRequires:  perl-Digest-MD5 >= 2.12
24 BuildRequires:  perl-IO-Socket-INET6 >= 2.51
25 BuildRequires:  perl-MIME-Base64 >= 2.11
26 BuildRequires:  perl-Net-IP >= 1.20
27 BuildRequires:  perl-Test-Pod
28 %endif
29 BuildRequires:  rpm-perlprov >= 4.1-13
30 %if %{without libresolv}
31 BuildArch:      noarch
32 %endif
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Net::DNS is a DNS resolver implemented in Perl. It allows the
37 programmer to perform nearly any type of DNS query from a Perl script.
38
39 %description -l pl
40 Net::DNS jest resolverem DNS, zaimplementowanym w Perlu. Pozwala
41 programi¶cie na wykonanie niemal ka¿dego typu zapytania DNS ze skryptu
42 Perla.
43
44 %prep
45 %setup -q -n %{pdir}-%{pnam}-%{version}
46
47 %build
48 %{__perl} Makefile.PL </dev/null \
49         %{!?with_libresolv:--no-xs} \
50         --no-online-tests \
51         INSTALLDIRS=vendor
52 %{__make} \
53         %{?with_libresolv:OPTIMIZE="%{rpmcflags}"}
54
55 %{?with_tests:%{__make} test}
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
60
61 %{__make} pure_install \
62         DESTDIR=$RPM_BUILD_ROOT
63 cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
64 cp -a contrib $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
65 perl -pi -e 's#/usr/local/bin/perl#/usr/bin/perl#' $(find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -type f)
66
67 # get rid of pod documentation
68 %if %{with libresolv}
69 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Net/DNS/*.pod
70 %else
71 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/*.pod
72 %endif
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
78 %defattr(644,root,root,755)
79 %doc Changes README TODO
80 %if %{with libresolv}
81 %{perl_vendorarch}/Net/DNS.pm
82 %{perl_vendorarch}/Net/DNS
83 %{perl_vendorarch}/auto/Net/DNS/DNS.bs
84 %dir %{perl_vendorarch}/auto/Net/DNS
85 %attr(755,root,root) %{perl_vendorarch}/auto/Net/DNS/DNS.so
86 %else
87 %{perl_vendorlib}/Net/DNS.pm
88 %{perl_vendorlib}/Net/DNS
89 %endif
90
91 %{_mandir}/man3/*
92 %{_examplesdir}/%{name}-%{version}
This page took 0.031757 seconds and 4 git commands to generate.