+#
+# Conditional build:
+%bcond_with tests # perform "make test" (fails in 1.53)
+#
%include /usr/lib/rpm/macros.perl
%define pdir XML
%define pnam LibXSLT
-Summary: XML::LibXSLT perl module
-Summary(pl): Modu³ perla XML::LibXSLT
+Summary: XML::LibXSLT - interface to the GNOME libxslt library
+Summary(pl): XML::LibXSLT - interfejs do biblioteki libxslt z GNOME
Name: perl-%{pdir}-%{pnam}
-Version: 1.50
+Version: 1.57
Release: 1
-License: GPL
+License: GPL/Artistic
Group: Development/Languages/Perl
-Source0: ftp://ftp.cpan.org/pub/CPAN/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 9b831bc5a97444103f345105f0f6fced
BuildRequires: libxslt-devel >= 1.0.6
-BuildRequires: perl-XML-LibXML >= 1.30
-BuildRequires: perl-devel >= 5.6.1
-BuildRequires: rpm-perlprov >= 4.0.2-56
+BuildRequires: perl-XML-LibXML >= 1.57
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
Requires: libxslt >= 1.0.6
+Requires: perl-XML-LibXML >= 1.57
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%setup -q -n %{pdir}-%{pnam}-%{version}
%build
-perl Makefile.PL
-%{__make} OPTIMIZE="%{rpmcflags}"
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make} \
+ OPTIMIZE="%{rpmcflags}"
+
+%{?with_tests:%{__make} test}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
install example/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%clean
%files
%defattr(644,root,root,755)
%doc Changes README
-%{perl_sitearch}/XML/LibXSLT.pm
-%{perl_sitearch}/XML/benchmark.pl
-%dir %{perl_sitearch}/auto/XML/LibXSLT
-%{perl_sitearch}/auto/XML/LibXSLT/LibXSLT.bs
-%attr(755,root,root) %{perl_sitearch}/auto/XML/LibXSLT/LibXSLT.so
+%{perl_vendorarch}/XML/LibXSLT.pm
+%{perl_vendorarch}/XML/benchmark.pl
+%dir %{perl_vendorarch}/auto/XML/LibXSLT
+%{perl_vendorarch}/auto/XML/LibXSLT/LibXSLT.bs
+%attr(755,root,root) %{perl_vendorarch}/auto/XML/LibXSLT/LibXSLT.so
%{_mandir}/man3/*
%{_examplesdir}/%{name}-%{version}