%{?nodejs_find_provides_and_requires} %global packagename array-differ %global enable_tests 0 # tests temporarily disabled for bootstrap of other packages Name: nodejs-array-differ Version: 1.0.0 Release: 2%{?dist} Summary: Create an array with values in the first array but not others License: MIT URL: https://github.com/sindresorhus/array-differ Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. Source1: https://raw.githubusercontent.com/sindresorhus/array-differ/e91802976c4710eef8dea2090d48e48525cf41b1/test.js # The license file is not included in the npm tarball. Source2: https://raw.githubusercontent.com/sindresorhus/array-differ/e91802976c4710eef8dea2090d48e48525cf41b1/license ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha %endif Requires: nodejs %description Create an array with values in the first input array but not additional ones %prep %setup -q -n package # setup the tests cp -p %{SOURCE1} . # copy the license too cp -p %{SOURCE2} . %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 /usr/bin/mocha -R dot --bail %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license license %{nodejs_sitelib}/%{packagename} %changelog * Sun Oct 25 2015 Jared Smith - 1.0.0-2 - Temporarily disable tests for bootstrap * Sun Oct 25 2015 Jared Smith - 1.0.0-1 - Initial packaging