# circular dependency on modules needed for tests # tests depend on htmlparser2 which depends on this package %global enable_tests 0 %global srcname domhandler Name: nodejs-%{srcname} Version: 2.3.0 Release: 2%{?dist} Summary: Handler for htmlparser2 that turns pages into a dom License: BSD URL: https://github.com/fb55/DomHandler 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(htmlparser2) %endif %description %{summary}. %prep %setup -q -n package rm -rf node_modules/ %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json index.js lib/ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha -R list && jshint index.js test/ %endif %files %doc readme.md LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Sat Dec 6 2014 Piotr Popieluch - 2.3.0-2 - Set correct license - Added rm -rf node_modules/ - Removed Group tag * Sun Nov 23 2014 Piotr Popieluch - 2.3.0-1 - Initial package