perl-Archive-Zip/perl-Archive-Zip.spec

79 lines
2.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package perl-Archive-Zip
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
Name: perl-Archive-Zip
Accepting request 731678 from devel:languages:perl:autoupdate - updated to 1.66 see /usr/share/doc/packages/perl-Archive-Zip/Changes 1.66 Mon 16 Sep 2019 - Refactored low-level methods for reading and writing zip files in zip64 format. Added new parameters and return values to most of these. Extended constants in Archive::Zip to cover zip64 formats and lengths. - Added public APIs Archive::Zip::Archive::zip64 Archive::Zip::Archive::desiredZip64Mode Archive::Zip::Archive::versionMadeBy Archive::Zip::Archive::versionNeededToExtract Archive::Zip::Member::zip64 Archive::Zip::Member::desiredZip64Mode and constants Archive::Zip::ZIP64_AS_NEEDED Archive::Zip::ZIP64_EOCD Archive::Zip::ZIP64_HEADERS plus POD on these. - Added tests for zip64 format in t/21_zip64.t and more test zip files below t/data. Extended tests in t/02_main.t to perform all existing tests in all possible desired zip64 modes. - Extended methods Archive::Zip::Member::localExtraField Archive::Zip::Member::cdExtraField to perform format checks when called as setters and to reject any zip64 extended information extra fields passed by the user. Extended POD and tests in t/02_main.t accordingly. - Setting {'compressedSize'} after writing central directory header. - Added new optional parameter $noFormatError to method Archive::Zip::_readSignature to silence any format errros when testing for signatures. - Added error handling for potentially failed object conversion after calling method Archive::Zip::Member::_become. Factored in method Archive::Zip::Member::_becomeDirectoryIfNecessary into caller. - Changed methods Archive::Zip::Archive::contents Archive::Zip::Member::contents (and all inheriting from these) to consistently return a pair ($contents, $status) when called in list context and a scalar $contents when called in scalar context. Extended tests in t/02_main.t accordingly. - Changed method Archive::Zip::Member::extractToFileHandle to accept a file name instead of a file handle when extracting symbolic links. Changed lower-level and higher-level methods to use that feature. Cleaned up code related to the handling of symbolic links. Added creation of intermediate directories in method Archive::Zip::Member::extractToFileNamed for symbolic links as well. Reporting errors from symlink call as AZ-error. Added POD and test zip file t/data/symlink.zip and tests in t/26_symlinks.t for these changes. - Cleaned up code and added comment related to that highly dubious (?) {'wasWritten'} logic. OBS-URL: https://build.opensuse.org/request/show/731678 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Archive-Zip?expand=0&rev=56
2019-09-18 10:43:12 +02:00
Version: 1.66
Release: 0
%define cpan_name Archive-Zip
Summary: Provide an interface to ZIP archive files
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
Url: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/P/PH/PHRED/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Compress::Raw::Zlib) >= 2.017
Requires: perl(Compress::Raw::Zlib) >= 2.017
%{perl_requires}
%description
The Archive::Zip module allows a Perl program to create, manipulate, read,
and write Zip archive files.
Zip archives can be created, or you can read from existing zip files.
Once created, they can be written to files, streams, or strings. Members
can be added, removed, extracted, replaced, rearranged, and enumerated.
They can also be renamed or have their dates, comments, or other attributes
queried or modified. Their data can be compressed or uncompressed as
needed.
Members can be created from members in existing Zip files, or from existing
directories, files, or strings.
This module uses the Compress::Raw::Zlib library to read and write the
compressed streams inside the files.
One can use Archive::Zip::MemberRead to read the zip file archive members
as if they were files.
%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes examples README.md
%changelog