103 lines
3.4 KiB
RPMSpec
103 lines
3.4 KiB
RPMSpec
#
|
|
# spec file for package perl-Test-TempDir
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name Test-TempDir
|
|
Name: perl-Test-TempDir
|
|
Version: 0.110.0
|
|
Release: 0
|
|
# 0.11 -> normalize -> 0.110.0
|
|
%define cpan_version 0.11
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: (DEPRECATED) Temporary files support for testing
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(File::Path) >= 2.04
|
|
BuildRequires: perl(File::Temp) >= 0.2308
|
|
BuildRequires: perl(Module::Build)
|
|
BuildRequires: perl(Module::Build::Tiny) >= 0.034
|
|
BuildRequires: perl(Module::Metadata)
|
|
BuildRequires: perl(Moose)
|
|
BuildRequires: perl(Moose::Util::TypeConstraints)
|
|
BuildRequires: perl(MooseX::Types::Path::Class)
|
|
BuildRequires: perl(Path::Class)
|
|
BuildRequires: perl(Sub::Exporter)
|
|
BuildRequires: perl(Test::More) >= 0.88
|
|
BuildRequires: perl(Test::Requires)
|
|
BuildRequires: perl(namespace::autoclean) >= 0.08
|
|
BuildRequires: perl(ok)
|
|
Requires: perl(File::Temp) >= 0.2308
|
|
Requires: perl(Moose)
|
|
Requires: perl(Moose::Util::TypeConstraints)
|
|
Requires: perl(MooseX::Types::Path::Class)
|
|
Requires: perl(Path::Class)
|
|
Requires: perl(Sub::Exporter)
|
|
Requires: perl(namespace::autoclean) >= 0.08
|
|
Provides: perl(Test::TempDir) = %{version}
|
|
Provides: perl(Test::TempDir::Factory) = %{version}
|
|
Provides: perl(Test::TempDir::Handle) = %{version}
|
|
%undefine __perllib_provides
|
|
Recommends: perl(Directory::Scratch)
|
|
%{perl_requires}
|
|
|
|
%description
|
|
Test::TempDir provides temporary directory creation with testing in mind.
|
|
|
|
The differences between using this and using File::Temp are:
|
|
|
|
* If 't/tmp' is available (writable, creatable, etc) it's preferred over
|
|
'$ENV{TMPDIR}' etc. Otherwise a temporary directory will be used.
|
|
|
|
This is 'temp_root'
|
|
|
|
* Lock files are used on 't/tmp', to prevent race conditions when running
|
|
under a parallel test harness.
|
|
|
|
* The 'temp_root' is cleaned at the end of a test run, but not if tests
|
|
failed.
|
|
|
|
* 'temp_root' is emptied at the beginning of a test run unconditionally.
|
|
|
|
* The default policy is not to clean the individual 'tempfiles' and
|
|
'tempdirs' within 'temp_root', in order to aid in debugging of failed
|
|
tests.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
%build
|
|
perl Build.PL --installdirs=vendor
|
|
./Build build --flags=%{?_smp_mflags}
|
|
|
|
%check
|
|
./Build test
|
|
|
|
%install
|
|
./Build install --destdir=%{buildroot} --create_packlist=0
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes CONTRIBUTING README
|
|
%license LICENCE
|
|
|
|
%changelog
|