[perl-Unix-Syslog] Conditionalize test dependencies
Petr Pisar
ppisar at fedoraproject.org
Wed Nov 7 08:55:55 UTC 2012
commit 4b323504c21849269ac06103dee5dce3a0c8452e
Author: Petr Písař <ppisar at redhat.com>
Date: Wed Nov 7 09:47:27 2012 +0100
Conditionalize test dependencies
perl-Unix-Syslog.spec | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/perl-Unix-Syslog.spec b/perl-Unix-Syslog.spec
index 455ee17..1e51d0e 100644
--- a/perl-Unix-Syslog.spec
+++ b/perl-Unix-Syslog.spec
@@ -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 at redhat.com> - 1.1-13
+- Conditionalize test dependencies
+
* Wed Nov 07 2012 Petr Pisar <ppisar at redhat.com> - 1.1-12
- Specify all dependencies
- Do not export private library
More information about the perl-devel
mailing list