]> git.pld-linux.org Git - packages/perl-Net-DNS.git/blob - perl-Net-DNS.spec
- new bcond style; some cosmetics here and there; changelog cleanups
[packages/perl-Net-DNS.git] / perl-Net-DNS.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # perform "make test"
4 %bcond_with     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 do resolvera DNS
11 Name:           perl-Net-DNS
12 Version:        0.46
13 Release:        1
14 License:        GPL/Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5:  67bf0842afe5a5e313e5d45d8d2735fb
18 BuildRequires:  perl-devel >= 5.6
19 %if %{with tests}
20 BuildRequires:  perl-Digest-MD5 >= 2.12
21 BuildRequires:  perl-Digest-HMAC >= 1.00
22 BuildRequires:  perl-MIME-Base64 >= 2.11
23 BuildRequires:  perl-Test-Simple >= 0.18
24 BuildRequires:  perl-Test-Pod >= 0.95
25 %endif
26 BuildRequires:  rpm-perlprov >= 4.1-13
27 %if !%{with libresolv}
28 BuildArch:      noarch
29 %endif
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Net::DNS is a DNS resolver implemented in Perl. It allows the
34 programmer to perform nearly any type of DNS query from a Perl script.
35
36 %description -l pl
37 Net::DNS jest resolverem DNS, zaimplementowanym w Perlu. Pozwala
38 programi¶cie na wykonanie niemal ka¿dego typu zapytania DNS ze skryptu
39 Perla.
40
41 %prep
42 %setup -q -n %{pdir}-%{pnam}-%{version}
43
44 %build
45 %{__perl} Makefile.PL </dev/null \
46         %{?with_libresolv:      --xs} \
47         %{!?with_libresolv:     --no-xs} \
48         INSTALLDIRS=vendor
49
50 %{__make} \
51         %{?with_libresolv: OPTIMIZE="%{rpmcflags}"}
52
53 %{?with_tests:%{__make} test}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
58
59 %{__make} install \
60         DESTDIR=$RPM_BUILD_ROOT
61
62 install demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
63 cp -a contrib $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
69 %defattr(644,root,root,755)
70 %doc Changes README TODO
71 %if %{with libresolv}
72 %{perl_vendorarch}/%{pdir}/%{pnam}.pm
73 %{perl_vendorarch}/%{pdir}/%{pnam}
74 %{perl_vendorarch}/auto/%{pdir}/%{pnam}/%{pnam}.bs
75 %attr(755,root,root) %{perl_vendorarch}/auto/%{pdir}/%{pnam}/%{pnam}.so
76 %else
77 %{perl_vendorlib}/%{pdir}/%{pnam}.pm
78 %{perl_vendorlib}/%{pdir}/%{pnam}
79 %endif
80
81 %{_mandir}/man3/*
82 %{_examplesdir}/%{name}-%{version}
This page took 0.045829 seconds and 4 git commands to generate.