%global _module_name Net-FTP-RetrHandle Name: perl-%{_module_name} Version: 0.2 Release: 2%{?dist} Summary: Provides a file reading interface for reading files on a remote FTP server Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/~giff/%{_module_name}-%{version}/ Source0: http://search.cpan.org/CPAN/authors/id/G/GI/GIFF/%{_module_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker), perl(Test::More) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %{?perl_default_filter} %description Support for skipping the beginning of the file is implemented with the FTP REST command, which starts a retrieval at any point in the file. Support for skipping the end of the file is implemented with the FTP ABOR command, which stops the transfer. With these two commands and some careful tracking of the current file position, we're able to reliably emulate a seek/read pair, and get only the parts of the file that are actually read. This was originally designed for use with Archive::Zip; it's reliable enough that the table of contents and individual files can be extracted from a remote ZIP archive without downloading the whole thing. An interface compatible with IO::Handle is provided, along with a tie-based %prep %setup -q -n %{_module_name}-%{version} # remove any CVS static find t -type d -name CVS | xargs rm -rf %build %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make pure_install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';' %{_fixperms} $RPM_BUILD_ROOT/* %check # We can't allow tests that access the network under koji, so remove those # unless specified on the command line %{?!_with_net_tests: rm -f t/10remote.t} %{?!_with_net_tests: rm -f t/11tie.t} make test %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc # For noarch packages: vendorlib %{perl_vendorlib}/* %{_mandir}/man3/*.3* %doc TODO NEWS t %changelog * Sun Jul 17 2011 Bernard Johnson - 0.2-2 - add additional documentation files including test cases * Fri Jul 08 2011 Bernard Johnson - 0.2-1 - initial package