%global _module_name Net-FTP-RetrHandle Name: perl-%{_module_name} Version: 0.2 Release: 11%{?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,-) # For noarch packages: vendorlib %{perl_vendorlib}/* %{_mandir}/man3/*.3* %doc TODO NEWS t %changelog * Sat Jun 07 2014 Fedora Release Engineering - 0.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Aug 03 2013 Fedora Release Engineering - 0.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Jul 17 2013 Petr Pisar - 0.2-9 - Perl 5.18 rebuild * Thu Feb 14 2013 Fedora Release Engineering - 0.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Fri Jul 20 2012 Fedora Release Engineering - 0.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sun Jun 10 2012 Petr Pisar - 0.2-6 - Perl 5.16 rebuild * Fri Jan 13 2012 Fedora Release Engineering - 0.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Fri Jul 22 2011 Petr Sabata - 0.2-4 - Perl mass rebuild * Wed Jul 20 2011 Bernard Johnson - 0.2-3 - remove extraneous doc section * 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