[packages/perl-Test-Without-Module] - initial
arekm
arekm at pld-linux.org
Sun Oct 30 23:00:25 CET 2016
commit 10465918142747eb7660c3b36338cf5dc302eb5c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Oct 30 23:00:11 2016 +0100
- initial
perl-Test-Without-Module.spec | 61 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
---
diff --git a/perl-Test-Without-Module.spec b/perl-Test-Without-Module.spec
new file mode 100644
index 0000000..70bc287
--- /dev/null
+++ b/perl-Test-Without-Module.spec
@@ -0,0 +1,61 @@
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+#
+%define pdir Test
+%define pnam Without-Module
+%include /usr/lib/rpm/macros.perl
+Summary: Test::Without::Module - Test fallback behaviour in absence of modules
+Name: perl-Test-Without-Module
+Version: 0.18
+Release: 1
+# same as perl
+License: GPL v1+ or Artistic
+Group: Development/Languages/Perl
+Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: cd19ad26024e89fdfefb0ae0334ee500
+URL: http://search.cpan.org/dist/Test-Without-Module/
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+%if %{with tests}
+%endif
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This module allows you to deliberately hide modules from a program
+even though they are installed. This is mostly useful for testing modules
+that have a fallback when a certain dependency module is not installed.
+
+None. All magic is done via use Test::Without::Module LIST and
+no Test::Without::Module LIST.
+
+This function returns a reference to a copy of the current hash of forbidden
+modules or an empty hash if none are currently forbidden. This is convenient
+if you are testing and/or debugging this module.
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%dir %{perl_vendorlib}/Test/Without
+%{perl_vendorlib}/Test/Without/Module.pm
+%{_mandir}/man3/Test::Without::Module.3pm*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Test-Without-Module.git/commitdiff/10465918142747eb7660c3b36338cf5dc302eb5c
More information about the pld-cvs-commit
mailing list