%{?nodejs_find_provides_and_requires} %global packagename time-grunt %global github_tag_hash e16bf9553197898128fdd739db31c4f62c6b6dcd %global enable_tests 1 Name: nodejs-time-grunt Version: 1.2.2 Release: 1%{?dist} Summary: Display the elapsed execution time of grunt tasks License: MIT URL: https://github.com/sindresorhus/time-grunt Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz Source1: https://raw.githubusercontent.com/sindresorhus/time-grunt/%{github_tag_hash}/Gruntfile.js ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(chalk) BuildRequires: npm(date-time) BuildRequires: npm(figures) BuildRequires: npm(grunt-cli) BuildRequires: npm(pretty-ms) BuildRequires: npm(load-grunt-tasks) BuildRequires: npm(text-table) %endif Requires: nodejs %description Display the elapsed execution time of grunt tasks %prep %setup -q -n package # copy the gruntfile cp -p %{SOURCE1} . %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 # manually link the needed grunt modules ln -sf %{nodejs_sitelib}/load-grunt-tasks node_modules/load-grunt-tasks grunt && grunt sigint %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license license %{nodejs_sitelib}/%{packagename} %changelog * Thu Oct 22 2015 Jared Smith - 1.2.2-1 - Initial packaging