[packages/perl-Test-File] - new
qboosh
qboosh at pld-linux.org
Wed Oct 3 05:41:00 CEST 2018
commit cbbbc714bcadd73b9362e12f3d48d611492a9f86
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Oct 3 05:44:06 2018 +0200
- new
perl-Test-File-foreign-tests.patch | 33 ++++++++++++++++++
perl-Test-File.spec | 68 ++++++++++++++++++++++++++++++++++++++
2 files changed, 101 insertions(+)
---
diff --git a/perl-Test-File.spec b/perl-Test-File.spec
new file mode 100644
index 0000000..43809f4
--- /dev/null
+++ b/perl-Test-File.spec
@@ -0,0 +1,68 @@
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+#
+%define pdir Test
+%define pnam File
+%include /usr/lib/rpm/macros.perl
+Summary: Test::File - test file attributes
+Summary(pl.UTF-8): Test::File - testowanie atrybutów plików
+Name: perl-Test-File
+Version: 1.443
+Release: 1
+# "same as perl itself, under the Atristic License 2.0"
+License: Artistic v2.0
+Group: Development/Languages/Perl
+Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: ec8c6f6e940b454e110aaaa663fc761c
+Patch0: %{name}-foreign-tests.patch
+URL: https://metacpan.org/release/Test-File
+BuildRequires: perl-ExtUtils-MakeMaker >= 6.64
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+%if %{with tests}
+BuildRequires: perl(Test::Builder) >= 1.001006
+BuildRequires: perl-Test-Builder-Tester >= 1.04
+BuildRequires: perl-Test-Simple >= 0.95
+BuildRequires: perl-Test-utf8
+%endif
+Requires: perl(Test::Builder) >= 1.001006
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This modules provides a collection of test utilities for file
+attributes.
+
+%description -l pl.UTF-8
+Ten moduł udostępnia zestaw narzędzi testowych dla atrybutów plików.
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
+
+%build
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes
+%{perl_vendorlib}/Test/File.pm
+%{_mandir}/man3/Test::File.3pm*
+%{_examplesdir}/%{name}-%{version}
diff --git a/perl-Test-File-foreign-tests.patch b/perl-Test-File-foreign-tests.patch
new file mode 100644
index 0000000..4a8b963
--- /dev/null
+++ b/perl-Test-File-foreign-tests.patch
@@ -0,0 +1,33 @@
+--- Test-File-1.443/t/normalize.t.orig 2017-04-17 10:42:41.000000000 +0200
++++ Test-File-1.443/t/normalize.t 2018-10-03 05:40:31.560451925 +0200
+@@ -17,30 +17,6 @@
+ is( $normalized, $file, "Normalize gives same path for unix" );
+ };
+
+-subtest file_spec_win32 => sub {
+- my $module = 'File::Spec::Win32';
+- use_ok( $module );
+- local @File::Spec::ISA = ( $module );
+-
+- my $file = '/foo/bar/baz';
+- my $normalized = Test::File::_normalize( $file );
+-
+- isnt( $normalized, $file, "Normalize gives different path for Win32" );
+- is( $normalized, '\foo\bar\baz', "Normalize gives right path for Win32" );
+- };
+-
+-subtest file_spec_mac => sub {
+- my $module = 'File::Spec::Mac';
+- use_ok( $module );
+- local @File::Spec::ISA = ( $module );
+-
+- my $file = '/foo/bar/baz';
+- my $normalized = Test::File::_normalize( $file );
+-
+- isnt( $normalized, $file, "Normalize gives different path for Mac" );
+- is( $normalized, 'foo:bar:baz', "Normalize gives right path for Mac" );
+- };
+-
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+ # Try it when it shouldn't work
+ subtest normalize_undef => sub {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Test-File.git/commitdiff/cbbbc714bcadd73b9362e12f3d48d611492a9f86
More information about the pld-cvs-commit
mailing list