44b2a21
Name:           perl-Makefile-DOM
44b2a21
Version:        0.004
44b2a21
Release:        2%{?dist}
44b2a21
Summary:        Simple DOM parser for Makefiles
44b2a21
License:        GPL+ or Artistic
44b2a21
Group:          Development/Libraries
44b2a21
URL:            http://search.cpan.org/dist/Makefile-DOM/
44b2a21
Source0:        http://www.cpan.org/authors/id/A/AG/AGENT/Makefile-DOM-%{version}.tar.gz
44b2a21
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
44b2a21
BuildArch:      noarch
44b2a21
BuildRequires:  perl >= 1:5.6.1
44b2a21
BuildRequires:  perl(Clone) >= 0.18
44b2a21
BuildRequires:  perl(ExtUtils::MakeMaker)
44b2a21
BuildRequires:  perl(List::MoreUtils) >= 0.21
44b2a21
BuildRequires:  perl(Params::Util) >= 0.22
44b2a21
BuildRequires:  perl(CPAN)
44b2a21
BuildRequires:  perl(ExtUtils::Embed)
44b2a21
BuildRequires:  perl(Test::Harness)
44b2a21
BuildRequires:  perl(Test::More)
44b2a21
BuildRequires:  perl(Test::Simple)
44b2a21
Requires:       perl(Clone) >= 0.18
44b2a21
Requires:       perl(List::MoreUtils) >= 0.21
44b2a21
Requires:       perl(Params::Util) >= 0.22
44b2a21
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
44b2a21
Provides:       perl(Makefile::DOM) = %{version}
44b2a21
44b2a21
%description
44b2a21
This libary can serve as an advanced lexer for (GNU) makefiles. It parses
44b2a21
makefiles as "documents" and the parsing is lossless. The results are data
44b2a21
structures similar to DOM trees. The DOM trees hold every single bit of the
44b2a21
information in the original input files, including white spaces, blank
44b2a21
lines and makefile comments. That means it's possible to reproduce the
44b2a21
original makefiles from the DOM trees. In addition, each node of the DOM
44b2a21
trees is modifiable and so is the whole tree, just like the PPI module used
44b2a21
for Perl source parsing and the HTML::TreeBuilder module used for parsing
44b2a21
HTML source.
44b2a21
44b2a21
%prep
44b2a21
%setup -q -n Makefile-DOM-%{version}
44b2a21
44b2a21
%build
44b2a21
%{__perl} Makefile.PL INSTALLDIRS=vendor
44b2a21
make %{?_smp_mflags}
44b2a21
44b2a21
%install
44b2a21
rm -rf $RPM_BUILD_ROOT
44b2a21
44b2a21
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
44b2a21
44b2a21
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
44b2a21
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
44b2a21
44b2a21
%{_fixperms} $RPM_BUILD_ROOT/*
44b2a21
44b2a21
%check
44b2a21
make test
44b2a21
44b2a21
%clean
44b2a21
rm -rf $RPM_BUILD_ROOT
44b2a21
44b2a21
%files
44b2a21
%defattr(-,root,root,-)
44b2a21
%doc Changes README TODO
44b2a21
%{perl_vendorlib}/*
44b2a21
%{_mandir}/man3/*
44b2a21
44b2a21
%changelog
44b2a21
* Tue Sep 08 2009 Ryan Lerch <rlerch@redhat.com> 0.004-2
44b2a21
- Added BuildRequires and Provides lines to the specfile, as per the Fedora Perl Packaging Guidelines. 
44b2a21
* Mon Sep 07 2009 Ryan Lerch <rlerch@redhat.com> 0.004-1
44b2a21
- Specfile autogenerated by cpanspec 1.78.
44b2a21