Summary: Recognizes file formats and extracts format-specific comments Name: perl-File-Comments Version: 0.07 Release: 1%{?dist} License: GPL+ or Artistic Group: Development/Libraries Url: http://search.cpan.org/dist/File-Comments/ Source0: http://search.cpan.org/CPAN/authors/id/M/MS/MSCHILLI/File-Comments-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildArch: noarch BuildRequires: perl(Archive::Tar) >= 1.22 BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(HTML::TokeParser) >= 2.28 BuildRequires: perl(HTML::TreeBuilder) BuildRequires: perl(Log::Log4perl) >= 0.50 BuildRequires: perl(Module::Pluggable) >= 2.4 BuildRequires: perl(Pod::Parser) >= 1.14 BuildRequires: perl(PPI) >= 1.115 BuildRequires: perl(Sysadm::Install) >= 0.11 # For test suite BuildRequires: perl(Test::More) %description File::Comments guesses the type of a given file, determines the format used for comments, extracts all comments, and returns them as a reference to an array of chunks. Alternatively, it strips all comments from a file. Currently supported are Perl scripts, C/C++ programs, Java, makefiles, JavaScript, Python and PHP. %prep %setup -q -n File-Comments-%{version} # Note: not turning off exec bits in examples because they don't # introduce any unwanted dependencies (nor any dependencies that # are not satisfied by packages that are already required) # Remove dubious provide %global provfilt /bin/sh -c "%{__perl_provides} | %{__grep} -Fvx 'perl(PodExtractor)'" %define __perl_provides %{provfilt} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} %check %{__make} test TEST_VERBOSE=1 %install %{__rm} -rf %{buildroot} %{__make} pure_install PERL_INSTALL_ROOT=%{buildroot} /usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';' /usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} 2>/dev/null ';' %{__chmod} -R u+w %{buildroot}/* %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) %doc Changes README eg %{perl_vendorlib}/File/ %{_mandir}/man3/File::Comments.3pm* %{_mandir}/man3/File::Comments::Plugin.3pm* %{_mandir}/man3/File::Comments::Plugin::C.3pm* %{_mandir}/man3/File::Comments::Plugin::HTML.3pm* %{_mandir}/man3/File::Comments::Plugin::Java.3pm* %{_mandir}/man3/File::Comments::Plugin::JavaScript.3pm* %{_mandir}/man3/File::Comments::Plugin::Makefile.3pm* %{_mandir}/man3/File::Comments::Plugin::PHP.3pm* %{_mandir}/man3/File::Comments::Plugin::Perl.3pm* %{_mandir}/man3/File::Comments::Plugin::Python.3pm* %{_mandir}/man3/File::Comments::Plugin::Shell.3pm* %changelog * Thu Oct 9 2008 Paul Howarth 0.07-1 - Initial RPM version