+#
+# Conditional build:
+%bcond_with tests # perform "make test" (fails in 1.53)
+#
%include /usr/lib/rpm/macros.perl
%define pdir XML
%define pnam LibXSLT
# Source0-md5: 1fc25bedd58fbf9f3faf0d4936632645
BuildRequires: libxslt-devel >= 1.0.6
BuildRequires: perl-XML-LibXML >= 1.30
-BuildRequires: perl-devel >= 5.6.1
+BuildRequires: perl-devel >= 1:5.8.0
BuildRequires: rpm-perlprov >= 4.1-13
Requires: libxslt >= 1.0.6
+Requires: perl-XML-LibXML >= 1.30
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%build
%{__perl} Makefile.PL \
INSTALLDIRS=vendor
-%{__make} OPTIMIZE="%{rpmcflags}"
+%{__make} \
+ OPTIMIZE="%{rpmcflags}"
+
+%{?with_tests:%{__make} test}
%install
rm -rf $RPM_BUILD_ROOT
-%{__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}