%{?nodejs_find_provides_and_requires} %global packagename path-array %global enable_tests 1 Name: nodejs-path-array Version: 1.0.0 Release: 2%{?dist} Summary: Treat your $PATH like a JavaScript Array License: MIT # License text is at the bottom of README.md URL: https://github.com/TooTallNate/node-path-array.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: mocha BuildRequires: npm(array-index) %endif %description Treat your $PATH like a JavaScript Array %prep %setup -q -n package %nodejs_fixdep array-index '>=0.1.0' %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 %{__nodejs} -e 'require("./")' /usr/bin/mocha -R spec %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license README.md # license text is at the bottom of README.md, so I'm including it in both doc and # license sections %{nodejs_sitelib}/%{packagename} %changelog * Mon Dec 21 2015 Jared Smith - 1.0.0-2 - Relax dependency on npm(array-index) * Wed Dec 16 2015 Jared Smith - 1.0.0-1 - Initial packaging