%{?nodejs_find_provides_and_requires} %global packagename esfuzz %global enable_tests 0 # tests disabled due to missing dependencies Name: nodejs-esfuzz Version: 0.3.1 Release: 2%{?dist} Summary: JS fuzzer for generative testing of parsers License: BSD URL: https://github.com/michaelficarra/esfuzz Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(escodegen) %endif Requires: nodejs %description JS fuzzer for generative testing of parsers that implement the SpiderMonkey Reflect.parse API %prep %setup -q -n package %nodejs_fixdep nopt %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr *.json *.coffee lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}/bin install -p -D -m0755 bin/esfuzz %{buildroot}%{nodejs_sitelib}/esfuzz/bin/esfuzz mkdir -p %{buildroot}%{_bindir} ln -sf %{nodejs_sitelib}/%{packagename}/bin/esfuzz \ %{buildroot}%{_bindir}/esfuzz %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check /usr/bin/mocha -R spec %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %{_bindir}/esfuzz %changelog * Mon Oct 26 2015 Jared Smith - 0.3.1-2 - Relax requirements on npm(nopt) * Fri Oct 23 2015 Jared Smith - 0.3.1-1 - Initial packaging