%{?nodejs_find_provides_and_requires} %global packagename everything.js %global enable_tests 1 Name: nodejs-everything-dot-js Version: 1.0.3 Release: 1%{?dist} Summary: A JS file with every ECMA-262 edition 5.1 grammatical production License: BSD # License file requested upstream at https://github.com/michaelficarra/everything.js/issues/17 URL: https://github.com/michaelficarra/everything.js Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha %endif %description A single javascript file that contains every ECMA-262 edition 5.1 grammatical production %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 %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha --inline-diffs --check-leaks -u tdd -R spec test %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md %{nodejs_sitelib}/%{packagename} %changelog * Tue Nov 10 2015 Jared Smith - 1.0.3-1 - Initial packaging