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