]> git.pld-linux.org Git - packages/perl-Net-DNS.git/blobdiff - perl-Net-DNS.spec
- missing dir, missing br for test
[packages/perl-Net-DNS.git] / perl-Net-DNS.spec
index 268f4d65cb9713cfb38a40568c643a23476457c2..654d1827d36829e3ddef19496cc750a756e0523c 100644 (file)
@@ -1,63 +1,91 @@
+#
+# Conditional build:
+%bcond_without tests           # do not perform "make test"
+%bcond_without libresolv       # link against libresolv (creates architecture-dependent package)
+#
 %include       /usr/lib/rpm/macros.perl
-Summary:       Net-DNS perl module
-Summary(pl):   Modu³ perla Net-DNS
+%define                pdir    Net
+%define                pnam    DNS
+Summary:       Net::DNS - Perl interface to the DNS resolver
+Summary(pl):   Net::DNS - interfejs perlowy do resolvera DNS
 Name:          perl-Net-DNS
-Version:       0.12
-Release:       3
-License:       GPL
+Version:       0.53
+Release:       2.1
+# same as perl
+License:       GPL v1+ or Artistic
 Group:         Development/Languages/Perl
-Group(pl):     Programowanie/Jêzyki/Perl
-Source0:       ftp://ftp.perl.org/pub/CPAN/modules/by-module/Net/Net-DNS-%{version}.tar.gz
-Patch0:                perl-Net-DNS-paths.patch
-BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: perl >= 5.005_03-14
-%requires_eq   perl
-Requires:      %{perl_sitearch}
+Source0:       http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 404797359373d4df1a025458ab1415f7
+BuildRequires: perl-devel >= 1:5.8.0
+%if %{with tests}
+BuildRequires: perl-Digest-BubbleBabble
+BuildRequires: perl-Digest-HMAC >= 1.00
+BuildRequires: perl-Digest-MD5 >= 2.12
+BuildRequires: perl-IO-Socket-INET6 >= 2.51
+BuildRequires: perl-MIME-Base64 >= 2.11
+BuildRequires: perl-Net-IP >= 1.20
+BuildRequires: perl-Test-Pod
+%endif
+BuildRequires: rpm-perlprov >= 4.1-13
+%if %{without libresolv}
+BuildArch:     noarch
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Net-DNS - Perl interface to the DNS resolver.
+Net::DNS is a DNS resolver implemented in Perl. It allows the
+programmer to perform nearly any type of DNS query from a Perl script.
 
 %description -l pl
-Net-DNS - interfejs do resolvera DNS.
+Net::DNS jest resolverem DNS, zaimplementowanym w Perlu. Pozwala
+programi¶cie na wykonanie niemal ka¿dego typu zapytania DNS ze skryptu
+Perla.
 
 %prep
-%setup -q -n Net-DNS-%{version}
-%patch -p1
+%setup -q -n %{pdir}-%{pnam}-%{version}
 
 %build
-perl Makefile.PL
-make
+%{__perl} Makefile.PL </dev/null \
+       --%{!?with_libresolv:no-}xs \
+       --no-online-tests \
+       INSTALLDIRS=vendor
+%{__make} \
+       %{?with_libresolv: OPTIMIZE="%{rpmcflags}"}
+
+%{?with_tests:%{__make} test}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_prefix}/src/examples/%{name}-%{version}
-
-make install DESTDIR=$RPM_BUILD_ROOT
-
-install demo/* $RPM_BUILD_ROOT%{_prefix}/src/examples/%{name}-%{version}
-cp -a contrib $RPM_BUILD_ROOT%{_prefix}/src/examples/%{name}-%{version}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
-(
-  cd $RPM_BUILD_ROOT%{perl_sitearch}/auto/Net/DNS
-  sed -e "s#$RPM_BUILD_ROOT##" .packlist >.packlist.new
-  mv .packlist.new .packlist
-)
+%{__make} pure_install \
+       DESTDIR=$RPM_BUILD_ROOT
+install demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a contrib $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man3/* \
-        Changes README TODO
+# get rid of pod documentation
+%if %{with libresolv}
+rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Net/DNS/*.pod
+%else
+rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Net/DNS/*.pod
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc {Changes,README,TODO}.gz
-
-%{perl_sitelib}/Net/DNS.pm
-%{perl_sitelib}/Net/DNS
-%{perl_sitearch}/auto/Net/DNS
+%doc Changes README TODO
+%if %{with libresolv}
+%{perl_vendorarch}/Net/DNS.pm
+%{perl_vendorarch}/Net/DNS
+%{perl_vendorarch}/auto/Net/DNS/DNS.bs
+%dir %{perl_vendorarch}/auto/Net/DNS
+%attr(755,root,root) %{perl_vendorarch}/auto/Net/DNS/DNS.so
+%else
+%{perl_vendorlib}/Net/DNS.pm
+%{perl_vendorlib}/Net/DNS
+%endif
 
 %{_mandir}/man3/*
-
-%{_prefix}/src/examples/%{name}-%{version}
+%{_examplesdir}/%{name}-%{version}
This page took 0.065332 seconds and 4 git commands to generate.