%{?nodejs_find_provides_and_requires} %global packagename indexof # Tests disabled due to long chain of missing dependencies for trivial tests %global enable_tests 0 Name: nodejs-indexof Version: 0.0.3 Release: 2%{?dist} Summary: A lame indexOf thing License: MIT URL: https://github.com/component/indexof/ Source0: https://github.com/component/indexof/archive/0.0.3.tar.gz Source1: https://raw.githubusercontent.com/component/indexof/master/LICENSE ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha %endif %description A lame indexOf thing %prep %setup -q -n %{packagename}-%{version} # copy license file cp -p %{SOURCE1} . %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} /usr/bin/mocha -R spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Wed Feb 17 2016 Jared Smith - 0.0.3-2 - Add Provides: for npm(indexof) * Tue Feb 16 2016 Jared Smith - 0.0.3-1 - Initial packaging