# tests depend on jshint which is not packaged due to license issues %global enable_tests 0 %global srcname dom-serializer Name: nodejs-%{srcname} Version: 0.1.0 Release: 1%{?dist} Summary: Render dom nodes to string License: MIT URL: https://github.com/cheeriojs/dom-serializer Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(cheerio) BuildRequires: npm(expect.js) BuildRequires: npm(jshint) BuildRequires: npm(lodash) BuildRequires: npm(mocha) BuildRequires: npm(xyz) %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 %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha test.js %endif %files %license LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Tue Mar 10 2015 Piotr Popieluch - 0.1.0-1 - Initial package