%{?nodejs_find_provides_and_requires} %global packagename array-index %global enable_tests 1 Name: nodejs-array-index Version: 0.2.0 Release: 2%{?dist} Summary: Invoke getter/setter functions on array-like objects License: MIT # License text is at bottom of README.md URL: https://github.com/TooTallNate/array-index.git 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: npm(debug) %endif %description Invoke getter/setter functions on array-like objects %prep %setup -q -n package # Create separate license file from the license information at the bottom of # the README.md file %{_bindir}/grep -A100 '^License$' README.md > LICENSE.md %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr *.json index.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %{__nodejs} test.js %endif %files %{!?_licensedir:%global license %doc} %doc README.md History.md %license LICENSE.md %{nodejs_sitelib}/%{packagename} %changelog * Wed Dec 16 2015 Jared Smith - 0.2.0-2 - Initial packaging