%define perl_vendorarch %(eval "`%{_bindir}/perl -V:installvendorarch`"; echo $installvendorarch) %define perl_vendorarch64 %(eval "`%{_bindir}/perl_64bit -V:installvendorarch`"; echo $installvendorarch) %define real_name HTML-Parser Name: perl-%{real_name} Version: 3.60 Release: 1 Summary: Perl module for parsing HTML Group: Development/Libraries License: GPL+ or Artistic Url: http://search.cpan.org/dist/HTML-Parser/ Source0: http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/%{real_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: perl-HTML-Tagset >= 3.03 Requires: perl-HTML-Tagset >= 3.03 Requires: perl(:MODULE_COMPAT_%(eval "`%{_bindir}/perl -V:version`"; echo $version)) Requires: perl >= 5.8.8 %description The HTML-Parser module for perl to parse and extract information from HTML documents, including the HTML::Entities, HTML::HeadParser, HTML::LinkExtor, HTML::PullParser, and HTML::TokeParser modules. %prep export PATH=/opt/freeware/bin:$PATH %setup -q -n %{real_name}-%{version} chmod -c a-x eg/* mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build cd 32bit %{_bindir}/perl Makefile.PL INSTALLDIRS="vendor" make cd ../64bit %{_bindir}/perl_64bit Makefile.PL INSTALLDIRS="vendor" make %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 32bit make pure_install PERL_INSTALL_ROOT=${RPM_BUILD_ROOT} cd ../64bit make pure_install PERL_INSTALL_ROOT=${RPM_BUILD_ROOT} /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type f -name .packlist -exec rm -f {} ';' /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type f -name '*.bs' -empty -exec rm -f {} ';' /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type d -depth -exec rmdir {} 2>/dev/null ';' chmod -R u+w ${RPM_BUILD_ROOT}/* %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/Changes 32bit/README 32bit/TODO 32bit/eg/ %{perl_vendorarch}/* %{perl_vendorarch64}/* %{_mandir}/man3/* %changelog * Wed Jul 01 2009 Michael Perzl - 3.60-1 - first version for AIX V5.1 and higher