Name: perl-File-Unpack Version: 0.70 Release: %autorelease Summary: An strong archive file unpacker, based on mime-types License: GPL-1.0-or-later OR Artistic-1.0-Perl Source: http://search.cpan.org/CPAN/authors/id/J/JN/JNW/File-Unpack-%{version}.tar.gz Patch0: fix-xml-test.diff Patch1: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/5.diff Patch2: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/6.diff Patch3: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/9.diff Patch4: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/10.diff Patch5: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/11.diff Patch6: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/12.diff URL: https://github.com/jnweiger/perl-File-Unpack BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: make BuildRequires: gcc BuildRequires: perl(Test::CheckManifest) BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod::Coverage) BuildRequires: perl(Carp) BuildRequires: perl(Cwd) BuildRequires: perl(File::Compare) BuildRequires: perl(File::LibMagic) BuildRequires: perl(File::MimeInfo::Magic) BuildRequires: perl(File::Path) BuildRequires: perl(File::Temp) BuildRequires: perl(Compress::Raw::Lzma) # (provider perl-Compress-Raw-Zlib is obsoleted by installed perl) BuildRequires: perl(BSD::Resource) BuildRequires: perl(Compress::Raw::Bzip2) BuildRequires: perl(Compress::Raw::Zlib) >= 2.024 BuildRequires: perl(Filesys::Statvfs) BuildRequires: perl(IPC::Run) BuildRequires: perl(JSON) BuildRequires: perl(String::ShellQuote) BuildRequires: perl(Text::Sprintf::Named) # shared-mime-info is a dependency of perl-File-MimeInfo # file is a dependency of perl-File-LibMagic BuildRequires: fdupes BuildRequires: file >= 5.03 BuildRequires: shared-mime-info >= 0.60 Requires: perl(Carp) Requires: perl(Cwd) Requires: perl(File::LibMagic) Requires: perl(File::MimeInfo::Magic) Requires: perl(File::Path) Requires: perl(File::Temp) Requires: perl(Compress::Raw::Lzma) Requires: perl(Compress::Raw::Bzip2) Requires: perl(Compress::Raw::Zlib) Requires: file >= 5.03 Requires: shared-mime-info >= 0.60 Requires: perl(BSD::Resource) Requires: perl(Compress::Raw::Zlib) >= 2.024 Requires: perl(Filesys::Statvfs) Requires: perl(IPC::Run) Requires: perl(JSON) Requires: perl(Text::Sprintf::Named) # App-cpanminus provides a bogus String::ShellQuote. We need to go by package name here. # Requires: perl(String::ShellQuote) Requires: perl-String-ShellQuote ## refer to Unpack.pm:@builtin_mime_handlers and to the helper subdirectory ## to see what we might need: # grep '# Requires: ' Unpack.pm helper/* BuildRequires: xz Requires: xz BuildRequires: lzip Requires: lzip BuildRequires: poppler-utils Requires: poppler-utils ## The following BuildRequires is for testing existance only. ## If you cannot provide a package, you may remove it from both BuildRequires ## and Requires, and move it over to Recommends. BuildRequires: binutils BuildRequires: bzip2 BuildRequires: cabextract BuildRequires: cpio BuildRequires: genisoimage BuildRequires: gzip BuildRequires: p7zip BuildRequires: rpm BuildRequires: sharutils BuildRequires: tar BuildRequires: unzip Requires: binutils Requires: bzip2 Requires: cabextract Requires: cpio Requires: genisoimage Requires: gzip Requires: p7zip Requires: rpm Requires: sharutils Requires: tar Requires: unzip Recommends: unrar poppler-tools xz upx antiword xar Recommends: file-unpack == %version #tests #BuildRequires: perl(FindBin) %description File::Unpack is an unpacker for archives and files (bz2/gz/zip/tar/cpio/iso/rpm/deb/cab/lzma/7z/rar/...). We call it strong, because it is not fooled by file suffixes, or multiply wrapped packages. It reliably detects mime-types and recursivly descends into each archive found until it finally exposes all unpackable payload contents. A precise logfile can be written, describing mimetypes and unpack actions. Most of the known archive file formats are supported. Shell-script-style plugins can be added to support additinal formats. %package -n file-unpack Summary: Command line tool to unpack anything Requires: perl(File::Unpack) == %version %description -n file-unpack /usr/bin/file-unpack is a trivial command line frontend that ships with the File::Unpack perl module. %prep %setup -q -n File-Unpack-%{version} %patch 0 -p1 %patch 1 -p1 %patch 2 -p1 %patch 3 -p1 %patch 4 -p1 %patch 5 -p1 %patch 6 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} (cd contrib && %{__make} stringsx) %install %{__make} pure_install PERL_INSTALL_ROOT=%{buildroot} create_packlist=0 mv %{buildroot}/usr/bin/{file_unpack,file-unpack} || : install -d %{buildroot}/usr/share/File-Unpack/helper/ install helper/* %{buildroot}/usr/share/File-Unpack/helper/ %fdupes %{buildroot}/usr/share/File-Unpack/ ln -s file-unpack %{buildroot}/%{_bindir}/file_unpack ln -s file-unpack %{buildroot}/%{_bindir}/unpack-file ln -s file-unpack %{buildroot}/%{_bindir}/unpack-file-deep ln -s file-unpack %{buildroot}/%{_bindir}/unpack-deep ln -s file-unpack %{buildroot}/%{_bindir}/file-unpack-deep ## CAUTION: a line beginning with . is a macro-expanded by nroff. # echo .nf > file-unpack.1 # perl -Iblib/lib file-unpack.pl --help >> file-unpack.1 && true # rm -rf file-unpack.1 cat < file-unpack.pod =pod =head1 SYNOPSIS EOF perl file-unpack.pl --help >> file-unpack.pod && true cat <> file-unpack.pod =head1 REFERENCES See also C EOF1 pod2man file-unpack.pod > file-unpack.1 rm file-unpack.pod echo <> MANIFEST file-unpack.1 EOF2 install -m0644 -D file-unpack.1 %{buildroot}/%_mandir/man1/file-unpack.1 ln -s file-unpack.1 %{buildroot}/%_mandir/man1/unpack_file.1 install -m0755 -D contrib/stringsx %{buildroot}/%_bindir/stringsx rm contrib/stringsx # so that the Manifest in make check is not confused. # FIXME: use ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 # maybe then we would not need to remove the .packlist files :-) find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';' %{_fixperms} %{buildroot}/* %check #export RELEASE_TESTING=1 #%{__make} test %files %doc README Changes %{perl_vendorlib}/* %dir /usr/share/File-Unpack /usr/share/File-Unpack/* %doc %_mandir/man3/* %files -n file-unpack %{_bindir}/* %doc %_mandir/man1/* %changelog %autochangelog