# tests partially enabled # 'npm run lint' has as circular dependency problem # depends on: jshint->htmlparser2->jshint %global enable_tests 1 %global srcname htmlparser2 Name: nodejs-%{srcname} Version: 3.8.2 Release: 1%{?dist} Summary: Fast & forgiving HTML/XML/RSS parser License: MIT Group: System Environment/Libraries URL: https://github.com/fb55/htmlparser2 Source0: http://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(mocha) BuildRequires: npm(domhandler) BuildRequires: npm(entities) BuildRequires: npm(domutils) %endif %description %{summary}. %prep %setup -q -n package %nodejs_fixdep entities '~1.0' %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json lib/ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha # lint depends on jshint #mocha && npm run lint %endif %files %doc README.md LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Sun Nov 23 2014 Piotr Popieluch - 3.8.2-1 - Initial package