%{?nodejs_find_provides_and_requires} %global packagename array-union %global github_tag_hash d0e72cc6fbff57273032e45050c51ff44c8e137c %global enable_tests 0 # tests disabled for bootstrapping Name: nodejs-array-union Version: 1.0.1 Release: 2%{?dist} Summary: Create an array of unique values, in order, from the input arrays License: MIT URL: https://github.com/sindresorhus/array-union Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. Grab test.js from github intead Source1: https://raw.githubusercontent.com/sindresorhus/array-union/%{github_tag_hash}/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-union/%{github_tag_hash}/license ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(array-uniq) %endif Requires: nodejs %description Create an array of unique values, in order, from the input arrays %prep %setup -q -n package # setup the tests cp -p %{SOURCE1} . 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 * Sun Oct 25 2015 Jared Smith - 1.0.1-2 - Temporarily disable tests for bootstrapping * Thu Oct 22 2015 Jared Smith - 1.0.1-1 - Initial packaging