File perl-PawsX-S3-Uploader.spec of Package perl-PawsX-S3-Uploader
#
# spec file for package perl-PawsX-S3-Uploader
#
# Copyright (c) 2026 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 PawsX-S3-Uploader
Name: perl-PawsX-S3-Uploader
Version: 0.0.3
Release: 0
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Upload to S3 from a streaming source
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/D/DA/DAKKAR/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Feature::Compat::Class) >= 0.07
BuildRequires: perl(Feature::Compat::Try) >= 0.05
BuildRequires: perl(Path::Tiny) >= 0.011
BuildRequires: perl(Paws)
BuildRequires: perl(Paws::Credential::Explicit)
BuildRequires: perl(Paws::Net::MultiplexCaller)
BuildRequires: perl(PawsX::FakeImplementation::Instance)
BuildRequires: perl(Test2::V0)
BuildRequires: perl(Tie::StdHandle)
BuildRequires: perl(builtin::compat) >= 0.003003
BuildRequires: perl(parent)
Requires: perl(Feature::Compat::Class) >= 0.07
Requires: perl(Feature::Compat::Try) >= 0.05
Requires: perl(builtin::compat) >= 0.003003
%{perl_requires}
%description
This class automates uploading objects to AWS S3 via Paws, for the cases
where you can't keep the whole data in memory, or you can't even generate
it all ahead of time.
Underneath, it uses 'PutObject' for objects smaller than 5MB, and
'CreateMultipartUpload' / 'UploadPart' / 'CompleteMultipartUpload' for
larger objects.
Exceptions in 'UploadPart' cause the upload to be aborted, and the
exception is re-thrown (so you can trap it yourself if you need to). You
should also explicitly abort the upload if something goes wrong in your own
code.
%prep
%autosetup -n %{cpan_name}-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes
%license LICENSE
%changelog