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