@ -36,8 +36,6 @@ BuildRequires: perl(Data::Dumper)
BuildRequires: perl(File::Spec::Unix)
BuildRequires: perl(lib)
BuildRequires: perl(Test::More)
# Do not require any decopressing module or executable by default. Let's user
# install what he needs.
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%if 0%(perl -e 'print $] > 5.017')
Requires: perl(deprecate)
@ -48,6 +46,17 @@ Requires: perl(File::Spec) >= 0.82
Requires: perl(IPC::Cmd) >= 0.64
Requires: perl(Module::Load::Conditional) >= 0.04
Requires: perl(Params::Check) >= 0.07
# Decompressors:
Requires: %{name}-bz2
Requires: %{name}-gz
Requires: %{name}-lzma
Requires: %{name}-tar
Requires: %{name}-tbz
Requires: %{name}-tgz
Requires: %{name}-txz
Requires: %{name}-Z
Requires: %{name}-zip
Requires: %{name}-xz
# Filter under-specified dependencies
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((File::Spec|IPC::Cmd|Module::Load::Conditional|Params::Check)\\)$
@ -59,6 +68,200 @@ extract any archive file of the type .tar, .tar.gz, .gz, .Z, tar.bz2, .tbz,
so, or use different interfaces for each type by using either perl modules, or
command-line tools on your system.
# Decompressors:
# bz2: bunzip2 || IO::Uncompress::Bunzip2
%package bz2-bunzip2
Summary: Bzip2 decompressor for %{name} via bunzip2
Provides: %{name}-bz2
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: bzip2
%description bz2-bunzip2
%{summary}.
%package bz2-IO-Uncompress-Bunzip2
Summary: Bzip2 decompressor for %{name} via IO::Uncompress::Bunzip2
Provides: %{name}-bz2
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(IO::Uncompress::Bunzip2)
%description bz2-IO-Uncompress-Bunzip2
%{summary}.
# gz: gzip || Compress::Zlib
%package gz-gzip
Summary: Gzip decompressor for %{name} via gzip
Provides: %{name}-gz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: gzip
%description gz-gzip
%{summary}.
%package gz-Compress-Zlib
Summary: Gzip decompressor for %{name} via Compress::Zlib
Provides: %{name}-gz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(Compress::Zlib)
%description gz-Compress-Zlib
%{summary}.
# lzma: unlzma || IO::Uncompress::UnLzma || Compress::unLZMA
%package lzma-unlzma
Summary: Lzma decompressor for %{name} via unlzma
Provides: %{name}-lzma
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: xz-lzma-compat
%description lzma-unlzma
%{summary}.
%package lzma-IO-Uncompress-UnLzma
Summary: Lzma decompressor for %{name} via IO::Uncompress::UnLzma
Provides: %{name}-lzma
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(IO::Uncompress::UnLzma)
%description lzma-IO-Uncompress-UnLzma
%{summary}.
%package lzma-Compress-unLZMA
Summary: Lzma decompressor for %{name} via Compress::unLZMA
Provides: %{name}-lzma
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: xz-lzma-compat
%description lzma-Compress-unLZMA
%{summary}.
# tar: tar || Archive::Tar
%package tar-tar
Summary: Tar decompressor for %{name} via tar
Provides: %{name}-tar
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: tar
%description tar-tar
%{summary}.
%package tar-Archive-Tar
Summary: Tar decompressor for %{name} via Archive::Tar
Provides: %{name}-tar
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(Archive::Tar)
%description tar-Archive-Tar
%{summary}.
# tbz: (tar && bunzip2) || (Archive::Tar && IO::Uncompress::Bunzip2)
%package tbz-tar-bunzip2
Summary: Bzipped-tar decompressor for %{name} via tar an bunzip2
Provides: %{name}-tbz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: tar
Requires: bzip2
%description tbz-tar-bunzip2
%{summary}.
%package tbz-Archive-Tar-IO-Uncompress-Bunzip2
Summary: Bzipped-tar decompressor for %{name} via Archive::Tar and IO::Uncompress::Bunzip2
Provides: %{name}-tbz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(Archive::Tar)
Requires: perl(IO::Uncompress::Bunzip2)
%description tbz-Archive-Tar-IO-Uncompress-Bunzip2
%{summary}.
# tgz: (tar && gzip) || (Archive::Tar && (Compress::Zlib || IO::Zlib))
%package tgz-tar-gzip
Summary: Gzipped-tar decompressor for %{name} via tar and gzip
Provides: %{name}-tgz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: tar
Requires: gzip
%description tgz-tar-gzip
%{summary}.
%package tgz-Archive-Tar-Compress-Zlib
Summary: Gzipped-tar decompressor for %{name} via Archive::Tar and Compress::Zlib
Provides: %{name}-tgz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(Archive::Tar)
Requires: perl(Compress::Zlib)
%description tgz-Archive-Tar-Compress-Zlib
%{summary}.
%package tgz-Archive-Tar-IO-Zlib
Summary: Gzipped-tar decompressor for %{name} via Archive::Tar and IO::Zlib
Provides: %{name}-tgz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(Archive::Tar)
Requires: perl(IO::Zlib)
%description tgz-Archive-Tar-IO-Zlib
%{summary}.
# txz: (tar && unxz) || (Archive::Tar && IO::Uncompress::UnXz)
%package txz-tar-unxz
Summary: Xzed-tar decompressor for %{name} via tar and unxz
Provides: %{name}-txz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: tar
Requires: xz
%description txz-tar-unxz
%{summary}.
%package txz-Archive-Tar-IO-Uncompress-UnXz
Summary: Xzed-tar decompressor for %{name} via Archive::Tar and IO::Uncompress::UnXz
Provides: %{name}-txz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(Archive::Tar)
Requires: perl(IO::Uncompress::UnXz)
%description txz-Archive-Tar-IO-Uncompress-UnXz
%{summary}.
# Z: uncompress || Compress::Zlib
%package Z-uncompress
Summary: Z decompressor for %{name} via uncompress
Provides: %{name}-Z
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: ncompress
%description Z-uncompress
%{summary}.
%package Z-Compress-Zlib
Summary: Z decompressor for %{name} via Compress::Zlib
Provides: %{name}-Z
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(Compress::Zlib)
%description Z-Compress-Zlib
%{summary}.
# zip: unzip || Archive::Zip
%package zip-unzip
Summary: ZIP decompressor for %{name} via unzip
Provides: %{name}-zip
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: unzip
%description zip-unzip
%{summary}.
%package zip-Archive-Zip
Summary: ZIP decompressor for %{name} via Archive::Zip
Provides: %{name}-zip
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(Archive::Zip)
%description zip-Archive-Zip
%{summary}.
# xz: unxz || IO::Uncompress::UnXz
%package xz-unxz
Summary: Xz decompressor for %{name} via unxz
Provides: %{name}-xz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: unxz
%description xz-unxz
%{summary}.
%package xz-IO-Uncompress-UnXz
Summary: Xz decompressor for %{name} via IO::Uncompress::UnXz
Provides: %{name}-xz
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(IO::Uncompress::UnXz)
%description xz-IO-Uncompress-UnXz
%{summary}.
%prep
%setup -q -n Archive-Extract-%{version}
@ -79,6 +282,29 @@ make test
%{perl_vendorlib}/*
%{_mandir}/man3/*
%files bz2-bunzip2
%files bz2-IO-Uncompress-Bunzip2
%files gz-gzip
%files gz-Compress-Zlib
%files lzma-unlzma
%files lzma-IO-Uncompress-UnLzma
%files lzma-Compress-unLZMA
%files tar-tar
%files tar-Archive-Tar
%files tbz-tar-bunzip2
%files tbz-Archive-Tar-IO-Uncompress-Bunzip2
%files tgz-tar-gzip
%files tgz-Archive-Tar-Compress-Zlib
%files tgz-Archive-Tar-IO-Zlib
%files txz-tar-unxz
%files txz-Archive-Tar-IO-Uncompress-UnXz
%files Z-uncompress
%files Z-Compress-Zlib
%files zip-unzip
%files zip-Archive-Zip
%files xz-unxz
%files xz-IO-Uncompress-UnXz
%changelog
* Thu Apr 30 2015 Petr Pisar <ppisar@redhat.com> - 1:0.74-2
- Prefer Archive::Tar (bug #1217352)