Conditionalize test dependencies

This commit is contained in:
Petr Písař 2012-11-07 09:47:27 +01:00
parent da5f78dde7
commit 4b323504c2

View File

@ -1,16 +1,24 @@
# Tests require accessible syslog
%bcond_with test
Name: perl-Unix-Syslog
Version: 1.1
Release: 12%{?dist}
Release: 13%{?dist}
Summary: Perl interface to the UNIX syslog(3) calls
License: Artistic 2.0
Group: Development/Libraries
URL: http://search.cpan.org/dist/Unix-Syslog/
Source0: http://www.cpan.org/authors/id/M/MH/MHARNISCH/Unix-Syslog-%{version}.tar.gz
BuildRequires: perl(ExtUtils::MakeMaker)
%if %{with test}
# Run-requires:
BuildRequires: perl(DynaLoader)
BuildRequires: perl(Exporter)
# Tests:
BuildRequires: syslog
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: syslog
%{?perl_default_filter}
@ -34,8 +42,9 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
# Tests require accessible syslog
%{?_with_check:make test}
%if %{with test}
make test
%endif
%files
%doc Artistic Changes README
@ -44,6 +53,9 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
%{_mandir}/man3/*
%changelog
* Wed Nov 07 2012 Petr Pisar <ppisar@redhat.com> - 1.1-13
- Conditionalize test dependencies
* Wed Nov 07 2012 Petr Pisar <ppisar@redhat.com> - 1.1-12
- Specify all dependencies
- Do not export private library