Blob Blame History Raw
Name:           perl-SGML-Parser-OpenSP
Version:        0.99
Release:        4%{?dist}
Summary:        Perl interface to the OpenSP SGML and XML parser

Group:          Development/Libraries
License:        GPL or Artistic
URL:            http://search.cpan.org/dist/SGML-Parser-OpenSP/
Source0:        http://www.cpan.org/authors/id/M/MA/MAXIS/SGML-Parser-OpenSP-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  perl(Class::Accessor)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Test::Exception)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Pod)
BuildRequires:  opensp-devel
Requires:       perl(Class::Accessor)
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
SGML::Parser::OpenSP provides a native Perl interface, written in C++
and XS, to the OpenSP SGML and XML parser.


%prep
%setup -q -n SGML-Parser-OpenSP-%{version}
# POD Coverage is interesting for upstream, not us.
%{__perl} -pi -e 's|t/99podcov.t||' MANIFEST ; rm t/99podcov.t
find . -type f -print0 | xargs -0 chmod -c -x
%{__perl} -pi -e 's|\r||g' Changes README


%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*


%check
make test


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc Changes README
%{perl_vendorarch}/auto/SGML/
%{perl_vendorarch}/SGML/
%{_mandir}/man3/SGML::Parser::OpenSP*.3*


%changelog
* Thu May 10 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.99-4
- BuildRequire perl(Test::More) (#237883).

* Sat Apr 21 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.99-3
- BuildRequire perl(ExtUtils::MakeMaker) and perl(Test::Pod).

* Sat Sep 30 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.99-2
- Rebuild.

* Thu Aug 31 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.99-1
- 0.99.

* Wed Mar 29 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.99-0.1.cvs20060329
- First build.