# circular dependencies on test modules # htmlparser2 depends on domutils %global enable_tests 0 %global srcname domutils Name: nodejs-%{srcname} Version: 1.5.0 Release: 2%{?dist} Summary: Utilities for working with htmlparser2's dom License: BSD URL: https://github.com/FB55/domutils Source0: http://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(htmlparser2) BuildRequires: npm(domhandler) BuildRequires: npm(jshint) BuildRequires: npm(mocha) %endif %description %{summary}. %prep %setup -q -n package %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 test/tests/**.js && jshint index.js test/**/*.js lib/*.js %endif %files %doc readme.md LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Sat Dec 6 2014 Piotr Popieluch - 1.5.0-2 - Corrected license - Added rm -rf node_modules/ to prep section - Removed Group tag * Sun Nov 23 2014 Piotr Popieluch - 1.5.0-1 - Initial package