%{?nodejs_find_provides_and_requires} %global packagename array-uniq %global enable_tests 0 # tests disabled due to missing npm(es6-set) dependency Name: nodejs-array-uniq Version: 1.0.2 Release: 1%{?dist} Summary: Create an array without duplicates License: MIT URL: https://github.com/sindresorhus/array-uniq 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-uniq/d5e311f37692dfd25ec216490df10632ce5f69f3/test.js # Grab the license from GitHub as well, as for some reason the author leaves # it out of the npm tarball too :-( Source2: https://raw.githubusercontent.com/sindresorhus/array-uniq/d5e311f37692dfd25ec216490df10632ce5f69f3/license ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(es6-set) %endif Requires: nodejs %description Create an array without duplicates %prep %setup -q -n package # setup the tests cp -p %{SOURCE1} . # copy the license 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 spec %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license license %{nodejs_sitelib}/%{packagename} %changelog * Thu Oct 22 2015 Jared Smith - 1.0.2-1 - Initial packaging