%{?nodejs_find_provides_and_requires} %global packagename jsbn %global enable_tests 0 # There are no tests upstream Name: nodejs-jsbn Version: 0.0.0 Release: 1%{?dist} Summary: An implementation of large-number math in pure JavaScript License: BSD # License file requested at https://github.com/andyperlitch/jsbn/issues/5 URL: https://github.com/andyperlitch/jsbn.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha %endif Requires: nodejs %description The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers. %prep %setup -q -n package %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check # there is no test.js file in the npm tarball or upstream # but package.json says to run this: %{_bindir}/mocha test.js %endif %files %{!?_licensedir:%global license %doc} %doc *.md %{nodejs_sitelib}/%{packagename} %changelog * Thu Oct 29 2015 Jared Smith - 0.0.0-1 - Initial package