# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify CentOS Linux and Scientific Linux as rhel %if "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "sl" || "%{__distinit}" == "sls" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif # perl_vendorlib/perl_vendorarch not defined by default prior to F-2 %{!?perl_vendorlib: %global perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)} Summary: HTML validation module (& script) Name: perl-HTML-Lint Version: 2.06 Release: 8.%{__distinit}%{__distvers} License: GPL+ or Artistic Group: Development/Libraries Url: http://search.cpan.org/dist/HTML-Lint/ Source0: http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/HTML-Lint-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch BuildRequires: perl(HTML::Parser) >= 3.20, perl(HTML::Tagset) >= 3.03, perl(LWP::Simple) BuildRequires: perl(ExtUtils::MakeMaker), perl(Test::Pod), perl(Test::Pod::Coverage) Requires: perl(LWP::Simple) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Obsoletes: weblint < 1.9.4 Provides: weblint = %{version} %description HTML::Lint is a pure-Perl HTML parser and checker for syntactic legitimacy. The "weblint" script is now pretty much a wrapper around the HTML::Lint module. You can also look into Apache::Lint, which is a mod_perl wrapper around HTML::Lint. %package -n perl-Test-HTML-Lint License: GPL+ or Artistic Group: Development/Libraries Summary: Test::More-style wrapper around HTML::Lint Requires: %{name} = %{version}-%{release} %description -n perl-Test-HTML-Lint Test::HTML::Lint lets you automate HTML checking by providing a convenient wrapper for HTML::Lint. It is built with Test::Builder and plays happily with Test::More and friends. %prep %setup -q -n HTML-Lint-%{version} %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install PERL_INSTALL_ROOT=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null chmod -R u+w %{buildroot} %check make test %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README* Changes %{_bindir}/weblint %{perl_vendorlib}/HTML/ %{_mandir}/man3/HTML::Lint.3pm* %{_mandir}/man3/HTML::Lint::Error.3pm* %{_mandir}/man3/HTML::Lint::HTML4.3pm* %files -n perl-Test-HTML-Lint %defattr(-,root,root,-) %{perl_vendorlib}/Test/ %{_mandir}/man3/Test::HTML::Lint.3pm* %changelog * Mon Jun 27 2011 Paul Howarth 2.06-8 - Rebuild for perl 5.14.1 in Rawhide - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Sun Dec 19 2010 Paul Howarth 2.06-7 - Rebuild to fix problems with vendorarch/lib (#661697) * Sat Jun 26 2010 Paul Howarth 2.06-6 - Split Test::HTML::Lint into its own subpackage as it pulls in perl-devel - Remove redundant manual requires on perl(HTML::Parser) and perl(HTML::Tagset) * Fri Jun 25 2010 Paul Howarth 2.06-5 - Rebuild for perl 5.12.1 in Rawhide * Thu May 13 2010 Paul Howarth 2.06-4 - Fix dist tag for RHEL-6 Beta * Sun Feb 21 2010 Paul Howarth 2.06-3 - Dist tag for Rawhide no longer needs special-casing - Replace perl-libwww-perl dependency with more precise perl(LWP::Simple) dependency * Thu Sep 10 2009 Paul Howarth 2.06-2 - Define RPM macros in global scope - Fix provides so we don't self-obsolete * Fri Dec 19 2008 Paul Howarth 2.06-1 - Update to 2.06 - Tweak dist tag macros to work on current Rawhide with three-part releasenum * Tue Jun 3 2008 Paul Howarth 2.04-1 - Update to 2.04 * Tue Mar 11 2008 Paul Howarth 2.02-4 - Clarify license as GPL version 1 or later, of Artistic (i.e. same as perl) * Mon Jun 4 2007 Paul Howarth 2.02-3 - Fix dist tag for Fedora 7 onwards - Fix argument order for find with -depth - Add version number to obsoletes/provides for weblint - Add buildreq perl(ExtUtils::MakeMaker) * Fri Sep 1 2006 Paul Howarth 2.02-2 - Fix distribution tags for development releases - Define %%{__id_u} in a more portable way * Fri Nov 4 2005 Paul Howarth 2.02-1 - Update to 2.02 - Use search.cpan.org URLs - Simplify distribution-detection - Don't use macros in paths for build-time commands, hardcode them instead - Unconditionally remove buildroot in %%clean and %%install * Tue Oct 4 2005 Paul Howarth 2.00-1 - Update to 2.00 - Remove redundant find of empty .bs files - Fix directory ownership - Add BR's perl(Test::Pod), perl(Test::Pod::Coverage) * Fri Jun 24 2005 Paul Howarth 1.30-3 - Change Conflicts: to Obsoletes: (D'oh!) * Fri Jun 24 2005 Paul Howarth 1.30-2 - Rewrite spec file in (mainly) Fedora Extras style - Include full URL for source - Fix URL - Use MODULE_COMPAT dependency style and remove explicit perl dependency - Remove MANIFEST from %%doc - Add Provides: weblint * Tue Feb 1 2005 Paul Howarth 1.30-1 - Tidy up spec file - Update to 1.30 * Mon May 10 2004 Paul Howarth 1.28-1 - Initial build