#
# Conditional build:
-# _without_tests - do not perform "make test"
+%bcond_without tests # do not perform "make test"
#
%include /usr/lib/rpm/macros.perl
-%define pdir Carp
-%define pnam Assert
+%define pdir Carp
+%define pnam Assert
Summary: Carp::Assert - executable comments
Summary(pl): Carp::Assert - wykonywalne komentarze
Name: perl-Carp-Assert
-Version: 0.17
-Release: 9
-License: GPL
+Version: 0.18
+Release: 4
+# same as perl
+License: GPL v1+ or Artistic
Group: Development/Languages/Perl
-Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
-BuildRequires: perl >= 5.6.1
-%{!?_without_tests:BuildRequires: perl-Test-Simple >= 0.18}
+Source0: http://www.cpan.org/modules/by-module/Carp/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 8137794654f5802730c05167327d496e
+BuildRequires: perl-devel >= 1:5.8.0
+%if %{with tests}
+BuildRequires: perl-Test-Inline >= 0.16-3
+BuildRequires: perl-Test-Simple >= 0.40
+%endif
BuildRequires: rpm-perlprov >= 4.1-13
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%build
%{__perl} Makefile.PL \
- INSTALLDIRS=vendor
+ INSTALLDIRS=vendor
%{__make}
-%{!?_without_tests:%{__make} test}
+%{?with_tests:%{__make} test}
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc Changes README
-%{perl_vendorlib}/Carp
+%{perl_vendorlib}/Carp/Assert.pm
%{_mandir}/man3/*