%{?nodejs_find_provides_and_requires} %global enable_tests 1 Name: nodejs-diff Version: 1.0.8 Release: %mkrel 3 Summary: A JavaScript text diff implementation for Node.js # LICENSE text is included in README.md License: BSD Group: System/Libraries URL: https://github.com/kpdecker/jsdiff Source0: http://registry.npmjs.org/diff/-/diff-%{version}.tgz # Source1 is generated by running Source10, which pulls from the upstream # revision control repository. Source1: tests-v%{version}.tar.bz2 Source10: dl-tests.sh BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(colors) BuildRequires: npm(mocha) BuildRequires: npm(should) %endif %description %{summary} %prep %setup -q -n package %setup -q -T -D -a 1 -n package %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/diff cp -pr package.json diff.js \ %{buildroot}%{nodejs_sitelib}/diff %nodejs_symlink_deps %if 0%{?enable_tests} %check %{nodejs_sitelib}/mocha/bin/mocha test/*.js %endif %files %doc README.md %{nodejs_sitelib}/diff %changelog * Tue Dec 09 2014 tv <tv> 1.0.8-3.mga5 + Revision: 802490 - reenable testsuite * Wed Oct 29 2014 tv <tv> 1.0.8-2.mga5 + Revision: 794368 - disable tests for bootstrap - reenable tests * Tue Oct 28 2014 tv <tv> 1.0.8-1.mga5 + Revision: 794212 - disable tests for bootstrap - imported package nodejs-diff