%{?nodejs_find_provides_and_requires} %global enable_tests 1 Name: nodejs-monocle Version: 1.1.51 Release: %mkrel 2 Summary: A tool for watching directories for file changes License: BSD Group: System/Libraries URL: https://github.com/samccone/monocle Source0: http://registry.npmjs.org/monocle/-/monocle-%{version}.tgz # The test files are not included in the npm tarball. # Source1 is generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-00ccc2a0454058f0cd1964d0703d8322f78af049.tar.bz2 Source10: dl-tests.sh BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(mocha) BuildRequires: npm(readdirp) %endif %description %{summary}. %prep %setup -q -n package find . -type f -exec chmod -x '{}' \; %setup -q -T -D -a 1 -n package %nodejs_fixdep readdirp '~0.3' %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/monocle cp -pr package.json monocle.js \ %{buildroot}%{nodejs_sitelib}/monocle %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check /usr/bin/mocha test -R spec -t 2000 %endif %files %doc LICENSE README.md %{nodejs_sitelib}/monocle %changelog * Tue Dec 09 2014 tv <tv> 1.1.51-2.mga5 + Revision: 802492 - reenable testsuite * Wed Oct 29 2014 tv <tv> 1.1.51-1.mga5 + Revision: 794462 - disable tests for bootstrap - imported package nodejs-monocle